|
-
May 4th, 1999, 02:35 PM
#1
Enabling Menu Item in Main Menu?
I am trying to enable a menu item in the main menu bar.
I have a created a handler for the menu item in CMainFrame and have tried to call pMenu->EnableMenuItem(itemID, MF_BYCOMMAND|MF_GRAYED); and this doesn't seem to work.
However, calling pMenu->CheckMenuItem(itemID, MF_BYCOMMAND, MF_CHECKED) will put a checkmark next to the menu item.
I know this is a simple problem, please enlighten me with a possible solution?
Thanks,
Roberto
-
May 4th, 1999, 02:42 PM
#2
Re: Enabling Menu Item in Main Menu?
Hi Roberto:
You should add ON_UPDATE_UI commands for your menus. There you can enable or disable menu items.
You should also put your CheckMenuItem logic in that same handler. Do a search in your Online Documentation for CCmdUI.
Regards,
Francisco J. Novas
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|