?
Solved

HMENU

Posted on 1998-12-03
2
Medium Priority
?
334 Views
Last Modified: 2013-11-20
Using EnableMenuItem(
     hmenu
     uIDEnableItem
     UEnable);
in order to gray a menu item I was using MF_GRAYED and the ID of the menu item, but am unsure of how to get a handle to my menu (HMENU)....
0
Comment
Question by:MJohn
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 200 total points
ID: 1325721
If you're using MFC, then you shouldn't use EnableMenuItem. Instead, you should use ON_UPDATE_COMMAND_UI() macros in your message map. This will tell MFC that you want it to call your function to ask you whether the menu item should be enabled or not.

0
 

Author Comment

by:MJohn
ID: 1325722
How do I do this?
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

862 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