Solved

loading popup menu from resource

Posted on 1998-05-04
2
204 Views
Last Modified: 2013-11-20
hi, i need a right-click menu in my app. if i create the CMenu using CreatePopupMenu() and add the items at runtime, everything works fine. but i'd like to load the menu from the resource. but when i use the Loadmenu() function to load the menu from the resource, it is not being displayed properly. i only get a thin vertical strip whose height depends on the number of items in the menu but whose width is always around 10-20 pixels which is not enough to display the text. please help me out if you know a solution.
--thanks
Rajesh Vijayakumar
0
Comment
Question by:vijayk
2 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
Comment Utility
After you call LoadMenu you should call GetSubMenu to extract appropriate submenu you want to track as popup.
0
 

Author Comment

by:vijayk
Comment Utility
it worked! thanks
i had tried with just the menu bar with all the items (the "View as popup" option in the menu editor had me thinking that internally a menu bar and poup menu are same and that i could use the menubar itself as a popup menu but i was wrong)
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now