Using EnableMenuItem(
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)....
Who is Participating?
Tommy HuiConnect With a Mentor EngineerCommented:
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.

MJohnAuthor Commented:
How do I do this?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.