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 |
|
Michael Clapp
|
Aug 1, 2007 - 10:48 AM
|
I’ve been able to add a menu item dynamically using OnExtMenuPrepare and pPopup->ItemInsertCommand .
I also set pData->m_bMenuChanged = true;
However, I’ve observed that when CExtPopupMenuWnd::_UpdateCmdUI() is called, the CmdUI for this menu item does not get called because _state.m_pItemDataActive->IsNoCmdUI() returns true. It seems like the m_bNoCmdUI flag gets set to true whenever ItemInsertCommand gets called.
|
|
Technical Support
|
Aug 1, 2007 - 11:41 AM
|
You should use the CExtPopupMenuWnd::ItemInsertCommand() method if you do not want to see the MFC’s command updating mechanism applied to the inserted command item. You should use the CExtPopupMenuWnd::ItemInsert() method otherwise.
|
|