Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Kevin Eshbach
|
Jul 9, 2008 - 12:35 PM
|
Is there a public method I can call in CExtPopupMenuWnd to have CExtPopupMenuWnd::MENUITEMDATA::SetNoCmdUI set with a value of false for all items in a menu. I have a context menu with popup menus that I need to use MFC’s builtin Command UI handler mechanism for enabling/disabling menu items. I can derive a class from CExtPopupMenuWnd to get access to the m_items_all member variable of the top level menu, but then I have no way of updating any child menus because they aren’t using my derived class.
Kevin Eshbach
|
|
Technical Support
|
Jul 9, 2008 - 2:03 PM
|
The CExtPopupMenuWnd menus are using MFC command updating mechanism by default. But if you set the bNoRefToCmdMngr parameter to false in invocation of the CExtPopupMenuWnd::LoadMenu() or CExtPopupMenuWnd::UpdateFromMenu() methods or insert menu items via the CExtPopupMenuWnd::ItemInsertCommand() method then initialized menu command items will not be based on the command manager and will not use MFC’s command updating mechanism. You can also access data of each menu item like you described in your message for modifying its settings and behavior. So, please check how you initialize your popup menus.
|
|