ON_UPDATE_COMMAND_UI and CDialog's
-
I have an MFC dialog based app, and ON_UPDATE_COMMAND_UI just doesn't work. For some reason ON_UPDATE_COMMAND_UI is sent when I actually choose the menu-option (Rather when the menu drops down). After asking around and searching the net it seems like this is a known problem, but I haven't been able to find any good info on why and/or how to make it work. Is there someone here who can? Sprudling ;)
-
I have an MFC dialog based app, and ON_UPDATE_COMMAND_UI just doesn't work. For some reason ON_UPDATE_COMMAND_UI is sent when I actually choose the menu-option (Rather when the menu drops down). After asking around and searching the net it seems like this is a known problem, but I haven't been able to find any good info on why and/or how to make it work. Is there someone here who can? Sprudling ;)
Hi, For your first question, Suppose at run time you want to change(enable/disable,show/hide) the menuitems, then this function is usefull. Second, It works quite similar to other functions. You just have to add this function and write ur logic.
-
I have an MFC dialog based app, and ON_UPDATE_COMMAND_UI just doesn't work. For some reason ON_UPDATE_COMMAND_UI is sent when I actually choose the menu-option (Rather when the menu drops down). After asking around and searching the net it seems like this is a known problem, but I haven't been able to find any good info on why and/or how to make it work. Is there someone here who can? Sprudling ;)
One way to do this is to loop through all items once the popup menu is drop down and call
CCmdUI::DoUpdate
for all the child sub-menu. You will have to catchWM_MENUSELECT
and loop through the sub-menu. Good luck! Last Article: Client/Server Socket class -
One way to do this is to loop through all items once the popup menu is drop down and call
CCmdUI::DoUpdate
for all the child sub-menu. You will have to catchWM_MENUSELECT
and loop through the sub-menu. Good luck! Last Article: Client/Server Socket class