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 » OnUpdateToolsVerifyBeamOrientation(CCmdUI* pCmdUI) Collapse All
Subject Author Date
Brian Horn Feb 21, 2007 - 2:16 PM


1)    I have implemented ribbon gallery control inside ribbon bar same as shown in ribbon bar example Home-> Style Tab. which contains some buttons.
On clicking of each button i am doing certain functionality.

Need to know how will i get the functionality of OnUpdate so that I can enable/disable particular button in gallery
e. g a function is declared as below
void Class1::OnUpdateToolsVerifyBeamOrientation(CCmdUI* pCmdUI)

If i am using the button without gallery control it calls onupdate of that particular button when i click on ribbon tab which contains that button
however if the same button is inside gallery control it is not calling onupdate.

Technical Support Feb 22, 2007 - 11:05 AM

The ribbon gallery control (the CExtRibbonGalleryWnd class) is based on the toolbox control represented by CExtToolBoxWnd, which is a two level tree like control. The toolbox items are similar to the items in the list box in the tree view common control. These items are not controlled by MFC’s command updating mechanism. The CExtToolBoxWnd::TOOLBOX_ITEM_DATA objects implementing items in the toolbox control/gallery control do not support the disabled item state but they support the invisible state. This means the gallery/toolbox design is different from that of menus and toolbars. The items inside gallery/toolbox should be considered as always available and they cannot be disabled. You can disable only the entire gallery if you disable the ribbon gallery button’s command via MFC’s command updating mechanism.