Solved

HMENU

Posted on 1998-12-03
2
257 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 100 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
function returning CString in a regular win32 DLL 8 150
Tab names are off by one 5 49
while loop over for loop 7 81
withoutTen challenge 14 88
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

12 Experts available now in Live!

Get 1:1 Help Now