Professional UI Solutions
Site Map   /  Register


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 » I ask about RibbonBar in a mass. Collapse All
Subject Author Date
tarou iiyama Oct 20, 2006 - 1:35 AM


I ask about RibbonBar in a mass.
What will these perform?

pNodeParagraphBorder->SetCmdID( ID_PB_OUTSIDE_BORDERS, true );


What will __ECTN_TBB_AUTOCHANGE_ID perform?


Technical Support Oct 26, 2006 - 12:06 PM

The first and second questions relate to the effective identifier of the CExtBarButton button.
The CExtRibbonNodeToolButton button, which is used in the RibborBar sample, is derived from CExtBarButton. CExtBarButton buttons can be used in toolbars and menubars and CExtRibbonNodeToolButton in the ribbon. Such a button is designed to have two command identifiers: basic and effective.

The basic identifier is used to identify the button. For example, when you put a button into a toolbar resource using the VS designer, you can see that it has some identifier (just double click any button). So this identifier identifies the button. The effective identifier is used when you click the button and WM_COMMAND is sent. The effective identifier is sent in wParam of this message. If you have a regular button (it typically sends one particular command), the effective identifier (which is described below) and base identifiers are equal to each other. In other words, we could have not used two identifiers at all, we had had only regular buttons. The Save toolbar button is an example of regular toolbar button.

This changes when you have split button and you have to deal with two identifiers. The ECTN_TBB_AUTOCHANGE_ID constant you are asking about tells the button (which is a split button because __ECTN_TBB_SEPARATED_DROPDOWN is set) the following: when the user invokes your pop-up menu and selects a menu item, do change the effective identifier of the button and make it equal to the command id of the clicked menu item. A good example of this behavior is the Font Color button in MS Word/Excel, which is a kind of split button.

The TPMX_RIBBON_RESIZING and TPMX_RIBBON_RESIZING_VERTICAL_ONLY flags are popup menu tracking flags used when you are using the CExtPopupMenuWnd::TrackPopupMenu() method. These two flags deal with ribbon gallery menus only. The TPMX_RIBBON_RESIZING flag makes the ribbon gallery menu resizable in two dimensions. The TPMX_RIBBON_RESIZING_VERTICAL_ONLY flag should be used with previous flag only and makes the ribbon gallery menu get resized only vertically. Please take a look at the ribbon galleries in popup menus displayed from the buttons on the Home page in the RibbonBar sample application. Some of them have a resizing gripper in the right bottom corner and can be resized both horizontally and vertically. Some of them have a gripper which allows to resize the popup ribbon gallery menu only vertically.

Please do not hesitate to contact us if you have any questions.