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 General Discussion » Question about CExtRibbonNode or CExtCustomizeCmdTreeNode Collapse All
Subject Author Date
Roongrit Charoensupkul Oct 3, 2006 - 8:25 PM

What is the meaning of nCmdIdBasic and nCmdIdEffective parameters which are the arguments for the constructor of CExtRibbonNode or CExtCustomizeCmdTreeNode?

Technical Support Oct 4, 2006 - 9:13 AM

Your question is related to the CExtRibbonBar, CExtRibbonPage, CExtMenuControlBar, CExtToolControlBar and CExtPopupMenuWnd classes. All these classes can built its content from CExtCustomizeCmdTreeNode-based and/or CExtRibbonNode-based trees (CExtRibbonNode is derived from CExtCustomizeCmdTreeNode).

Each simple toolbar button and menu item has its own command identifier both in Prof-UIS and in MFC. The basic and effective command identifiers are specific for Prof-UIS only. These identifiers are equal to each other for regular toolbar buttons and menu items. They can be different for split toolbar buttons and split menu items. The basic command identifier specifies the toolbar button/menu item itself and the effective command identifier is used for sending the WM_COMMAND messages and updating the command state via MFC command updating mechanism, which is based on the CCmdUI class.

Why can basic and effective command identifiers be different for split buttons? The split button itself is identified with the basic command identifier, which is persistent. But it is divided into two parts. By clicking the left part, you fire the command associated with this button and this command is specified with the effective command identifier. You can assign another effective command identifier to this button by clicking its right part (identified with a down arrow) and selecting a command from the drop-down list.