MFC menus
How can I make a menu item not clickable according to a boolean, so if the boolean is true one can click the menu objekt, otherwise not.
-CProgrammer
Hmm I tried:
GetMenu()->EnableMenuItem(ID_FILE_NEW, MF_GRAYED);
But it doesnt work?
-CProgrammer
GetMenu()->EnableMenuItem(ID_FILE_NEW, MF_GRAYED);
But it doesnt work?
-CProgrammer
Try:
GetMenu()->GetSubMenu(0)->EnableMenuItem(ID_FILE_NEW, MF_GRAYED);
Assuming it is the first popup menu (index 0) ID_FILE_NEW is located in which I believe it is
/Cheers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement