BCGControlBar Pro for MFC
CBCGPRibbonMainButton

Detailed Description

The Ribbon Main Button (CBCGPRibbonMainButton) is a special button located in the left top corner of application window and displays a menu, which usually contains "File" command like Open, Save, Exit.

You can initialize and set the main ribbon button as following:

Copy
m_MainButton.SetMenu(IDR_FILE_MENU);
m_MainButton.SetImage(IDB_MAIN);
m_MainButton.SetToolTipText(_T("File"));
m_wndRibbonBar.SetMainButton(&m_MainButton, CSize(45, 45));
+ Inheritance diagram for CBCGPRibbonMainButton:

Public Member Functions

 CBCGPRibbonMainButtonConstructs main ribbon button object.
 
 CBCGPRibbonMainButtonConstructs main ribbon button object.
 
 GetScenicImageReturns scenic image.
 
 GetScenicTextReturns text displayed by Main Ribbon Button in scenic mode.
 
 SetImageAssigns a new image to main ribbon button.
 
 SetImageAssigns a new image to main ribbon button.
 
 SetScenicImageSets resource ID or handle of image used in scenic mode.
 
 SetScenicImageSets resource ID or handle of image used in scenic mode.
 
 SetScenicTextSets text for Main Ribbon Button (pearl) to be displayed in scenic mode.
 
- Public Member Functions inherited from CBCGPRibbonButton
 CBCGPRibbonButtonConstruct ribbon button object.
 
 CBCGPRibbonButtonConstruct ribbon button object.
 
 CBCGPRibbonButtonConstruct ribbon button object.
 
 AddSubItemAllows to create a popup menu on the fly by dynamically adding new ribbon elements.
 
 ClosePopupDlgCalled by the framework when the popup dialog is closed.
 
 EnablePopupDialogEnables the popup dialog associated with this button.
 
 EnablePopupDialogEnables the popup dialog associated with this button.
 
 FindSubItemIndexByIDReturns index of sub-item by its command ID.
 
 GetImageIndexReturns button's image index in associated image list.
 
 GetMenuReturns a handle to Windows menu assigned to button.
 
 IsDefaultCommandTells whether button can execute its default command.
 
 IsRightAlignMenuTells whether the menu is right aligned, or not.
 
 OnBeforeShowPopupDlgCalled by the framework before the popup dialog is displayed.
 
 OnClickCalled by the framework when user clicks a button.
 
 RemoveAllSubItemsRemoves all menu items from popup menu.
 
 RemoveSubItemRemoves a sub-item.
 
 SetAlwaysLargeImageEnables or disables transition to collapsed state.
 
 SetDefaultCommandTells the button that it can execute its default command.
 
 SetImageIndexSets button's image index in associated image list.
 
 SetMenuAssigns a popup menu to ribbon button.
 
 SetMenuAssigns a popup menu to ribbon button.
 
 SetRightAlignMenuSets popup menu alignment.
 
- Public Member Functions inherited from CBCGPBaseRibbonElement
 CanBeRemovedFromQATTells whether ribbon element can be removed from QAT.
 
 GetApplicationModesGets application modes where this control is visible.
 
 GetCursorAllows to specify a Ribbon control's custom mouse cursor.
 
 GetDataRetrieves a user-defined data associated with ribbon element.
 
 GetDescriptionReturns ribbon element description.
 
 GetIDReturns ribbon element command ID.
 
 GetKeysReturns key tip associated with ribbon element.
 
 GetMenuKeysReturns key tips associated with split button.
 
 GetRectReturns bounding rectangle of ribbon element.
 
 GetSimplifiedModeTypeRetrieves a ribbon element appearance in the Ribbon simplified mode.
 
 GetSizeReturns current size of ribbon element.
 
 GetTextReturns ribbon element text.
 
 IsBackstageViewModeTells whether a ribbon element works in "backstage view" mode.
 
 IsCheckedTells whether ribbon element is checked.
 
 IsCompactModeTells whether ribbon element is in compact mode.
 
 IsDisabledTells whether ribbon element is disabled.
 
 IsFocusedTells whether ribbon element is focused.
 
 IsHiddenInFullModeTells whether a ribbon element is invisible in the Ribbon classic (non-simplified) mode.
 
 IsHighlightedTells whether ribbon element is highlighted.
 
 IsPressedTells whether ribbon element is pressed.
 
 SetDataAssociates a user-defined data with ribbon element.
 
 SetIDSets command ID of ribbon element.
 
 SetKeysSets a key tip for ribbon element.
 
 SetSimplifiedModeTypeSpecifies a ribbon element appearance in the Ribbon simplified mode.
 
 SetToolTipTextSets tooltip text for ribbon element.
 

Additional Inherited Members

- Public Types inherited from CBCGPBaseRibbonElement
enum  RibbonElementLocation
 
enum  RibbonImageType
 
enum  RibbonSimplifiedModeType
 
- Protected Member Functions inherited from CBCGPBaseRibbonElement
 OnBeforeDestroyParentMenuBarCalled by the framework before the parent menu windo is destroyed.
 
 OnProcessKeyCalled by the framework when a ribbon element should process keyboard input.
 
 OnSetFocusCalled by the framework when a ribbon element receives or loses the input focus.