?
Solved

HMENU

Posted on 1998-12-03
2
Medium Priority
?
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

743 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