Professional UI Solutions
Site Map   /  Register
 
 

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.

Forums » Prof-UIS Tech Support » CExtPopupMenuWnd question Collapse All
Subject Author Date
tera tera Nov 24, 2008 - 11:54 PM

Hello.


BOOL CExtPopupMenuWnd::UpdateFromMenu(

    HWND hWndCmdRecv,

    CMenu * pBuildMenu,

    bool bPopupMenu, // = true

    bool bTopLevel, // = true

    bool bNoRefToCmdMngr // = false

)


Please teach it about the fifth parameter

Will not the menu be registered with Command Manager when I set a parameter in true?

Because I make a dynamic menu now, I am troubled when registered.

Technical Support Nov 25, 2008 - 12:36 PM

There are two types of menu command items:

1) Menu command items that work through the command manager. The icon, menu item text, status tip and cool tip parameters of menu item are stored in the command manager. Such items can be inserted into popup menus via the CExtPopupMenuWnd::ItemInsert() method or via the CExtPopupMenuWnd::LoadMenu() and CExtPopupMenuWnd::UpdateFromMenu() methods invoked with the bNoRefToCmdMngr parameter set to false.

2) Menu command items that do not work through the command manager. The menu item’s properties are stored in a popup menu object. Such items can be inserted into popup menus by using the CExtPopupMenuWnd::ItemInsertCommand() method or via the CExtPopupMenuWnd::LoadMenu() and CExtPopupMenuWnd::UpdateFromMenu() methods invoked with the bNoRefToCmdMngr parameter set to true.

Dynamically constructed menus can contain both types of menu commands. The 2nd type is often used when menu command identifiers are generated dynamically.