Solved

loading popup menu from resource

Posted on 1998-05-04
2
212 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
ID: 1307183
After you call LoadMenu you should call GetSubMenu to extract appropriate submenu you want to track as popup.
0
 

Author Comment

by:vijayk
ID: 1307184
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.NET how to use the Vertical ScrollBar 5 90
modThree challenge 4 76
fix34  challenge 9 104
Problem to event 3 74
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.
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

937 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

7 Experts available now in Live!

Get 1:1 Help Now