How to disable a submenu item that is a popup menu?
Posted on 2000-03-31
Scenario - Programming in Visual C++ version 5 using MFC wherever possible. I have a top level pulldown menu, several of teh submenu items are themselves popup menus which leads to submenu items and even further popup menus.
I need to be able to disable or enable or even remove andleter reinsert, one or several of these popups during runtime depending in my applications internal state. Enabling/disableing a submenu item that is not a popup is easy, each submenu item has an ID so I just have class wizard overide the ON_UPDATE_COMMAND_UI handlers and enable or disable it there.
But the popup portions of the submenu items do not have an ID associtated with them that I can see in the resource editor or class wizard. How do I traverse/ find the popup submenu item to perform the enable/disabling/removing/inserting? And once I find it how do I perform the enable/disabling/removing/inserting? Any help would be appreciated.