BCGControlBar Pro for MFC
CBCGPDropDownToolbarButton

Detailed Description

The CBCGPDropDownToolbarButton object acts as a regular toolbar button when clicked or opens a "child" drop-down toolbar (see CBCGPDropDownToolBar) when held down for a while. If the user invokes a command by clicking on the drop-down toolbar button, the command becomes current (as well as its image) and will be executed when the user clicks the drop-down toolbar button.

A button of CBCGPDropDownToolbarButton type differs from the regular button on the toolbar by a small arrow in the right-bottom corner of the button.

The CBCGPDropDownToolbarButton object may be exported to the toolbar menu button (CBCGPToolbarMenuButton) and be shown as menu item.

You should use the CBCGDropDownToolBarButton object in conjunction with the CBCGPDropDownToolBar object as a replacement for the dummy button reserved in the parent toolbar resource (CBCGPToolBar::ReplaceButton).

See also
CBCGPDropDownToolBar, CBCGPToolBar, CBCGPToolbarMenuButton
+ Inheritance diagram for CBCGPDropDownToolbarButton:

Public Member Functions

 CBCGPDropDownToolbarButtonConstructs a CBCGPDropDownToolbarButton object
 
 CBCGPDropDownToolbarButtonConstructs a CBCGPDropDownToolbarButton object
 
 SetDefaultCommandSets a default command to be invoked when the button is pressed
 
- Public Member Functions inherited from CBCGPToolbarButton
 CBCGPToolbarButtonConstructs and initializes a CBCGPToolbarButton object.
 
 CanBeDroppedIndicates whether a button can be dropped on a toolbar.
 
 CanBeStretchedIndicates whether a button can be stretched in customization mode.
 
 GetHwndReturns a handle to a window associated with a toolbar button.
 
 GetImageReturns a toolbar button's image.
 
 GetTextSizeReturns the size (in pixels) of the button text.
 
 HaveHotBorderDetermines whether a button displays the border in selected state or not.
 
 IsDrawImageTells whether a button's image is displayed.
 
 IsDrawTextTells whether a button's text label is displayed.
 
 IsEditableTells whether a button is customizable or not.
 
 IsHiddenTells whether a button is hidden or not.
 
 IsLockedReturns a flag indicating whether a button belongs to the locked (non-customizable) toolbar and can't be customized (dragged, dropped or edited).
 
 IsOnGlassChecks if button is located on DWM ("Glass") area of the parent toolbar.
 
 IsVisibleDetermines whether a toolbar button is visible or not.
 
 NotifyCommandCalled by the framework when the WM_COMMAND message is about to be send to a parent window.
 
 OnBeforeDragCalled by the framework before user begins to drag the button.
 
 OnBeforeDropCalled by the framework before button is dropped on target.
 
 OnCtlColorCalled by the framework when the parent toolbar processes OnCtlColor.
 
 OnDblClickCalled by the framework when the parent toolbar handles OnLButtonDblClk.
 
 OnGetCustomToolTipTextCalled by the framework when it needs to display a tooltip for the toolbar button.
 
 OnGlobalFontsChangedCalled by the framework when the global font has been changed.
 
 OnMoveCalled by the framework when the parent toolbar is moved.
 
 OnShowCalled by the framework to notify the button that it becomes visible or invisible.
 
 OnSizeCalled by the framework to notify the button that its parent toolbar has changed its size and/or position and the button should resize itself accordingly.
 
 OnToolHitTestCalled by the framework when the parent toolbar needs to determine whether a point is in the bounding rectangle of the specified tool.
 
 RectReturns a buttons' bounding rectangle.
 
 SetImageSets a button's image.
 
 SetRadioCalled by the framework when a button changes its check state.
 
 SetRectSets a new button's bounding rectangle.
 
 SetStyleSets a new button's style.
 
 SetVisibleShows or hides a toolbar button.
 
 ShowMakes a button visible or hidden.
 

Static Public Attributes

 m_uiShowBarDelaySpecifies delay for drop down bar.
 
- Static Public Attributes inherited from CBCGPToolbarButton
 m_bWrapTextIf TRUE, enables multi-line text labels.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBCGPToolbarButton
 GetProtectedCommandsReturns a reference to CList object, which contains a collection of commands that can't be customized by the user.
 
 SetProtectedCommandsSets a list of protected commands.
 
- Public Attributes inherited from CBCGPToolbarButton
 m_bImageIndicates whether the image of the toolbar button is displayed or not.
 
 m_bTextIndicates whether the text label of the toolbar button is displayed or not.
 
 m_bTextBelowIndicates whether the button's text label is displayed below the image.
 
 m_bUserButtonIndicates whether a button has the user-defined image (TRUE) or not (FALSE).
 
 m_bWholeTextIndicates whether a button displays full text label (TRUE), or clips the text and replace the rest by "..." if the text doesn't fit to the bounding rectangle.
 
 m_bWrapIf this flag is TRUE for a separator, the next to the separator button will be placed on the next row.
 
 m_nIDContains the command ID of a button.
 
 m_nStyleContains the style of a toolbar button.
 
 m_strTextContains the text label of a button.