Martin Thoma
April 12th, 1999, 03:47 AM
Disable Menu-Items
Hi !
I'm using a CMDIFrameWnd as main-window. My problem: I don't want to use the ON_UPDATE_COMMAND_UI-stuff, to do the enabling and disabling of the items of the menu in the framewindow. I want something like:
Somewhere in the code, I want to say:
menu->EnableMenuItem(command_id, MF_DISABLED);
to disable an item.
The problem is, that MFC overrides this states set somewhere in the programm. I tried to override OnInitMenu and OnInitPopupmenu, but it doesn't help.
It's very important, that we can use this sort of command-handling. There is no other (easy) way to implement our programm. Please help !
Regards
Martin
Hi !
I'm using a CMDIFrameWnd as main-window. My problem: I don't want to use the ON_UPDATE_COMMAND_UI-stuff, to do the enabling and disabling of the items of the menu in the framewindow. I want something like:
Somewhere in the code, I want to say:
menu->EnableMenuItem(command_id, MF_DISABLED);
to disable an item.
The problem is, that MFC overrides this states set somewhere in the programm. I tried to override OnInitMenu and OnInitPopupmenu, but it doesn't help.
It's very important, that we can use this sort of command-handling. There is no other (easy) way to implement our programm. Please help !
Regards
Martin