BCGControlBar Pro for MFC
CBCGPCalendarMenuButton

Detailed Description

The CBCGPCalendarMenuButton class is designed to allow easy implementation of CBCGPCalendarBar object when you want to integrate a calendar picker functionality with menus and toolbars .

The CBCGPCalendarMenuButton object should be created as a replacement for the regular menu item or toolbar button. When a CBCGPCalendarMenuButton object has been created you can set the desired CBCGPCalendarBar styles and then call ReplaceButton method exposed by CBCGPToolBar class. If you're dealing with tool bar customization, you need to call CBCGPToolbarCustomize::ReplaceButton method. The popup bar (CBCGPCalendarBar) is created during processing of CreatePopupMenu handler and notifies the parent frame by WM_COMMAND message. It sends as a Command ID the ID that has been assigned to the regular menu item before replacement of menu item.

See also
CBCGPCalendarBar, CBCGPToolBar, CBCGPToolbarMenuButton
+ Inheritance diagram for CBCGPCalendarMenuButton:

Public Member Functions

 CBCGPCalendarMenuButtonThe constructor.
 
 CBCGPCalendarMenuButtonThe constructor.
 
 EnableTearOffChanges an ability to have tear-off state for the calendar bar
 
 GetDateRetrieves the current button's date.
 
 SetDateChange a date.
 
- Public Member Functions inherited from CBCGPToolbarMenuButton
 CBCGPToolbarMenuButtonCopy constructor.
 
 CBCGPToolbarMenuButtonConstructs a CBCGPToolbarMenuButton object.
 
 CreateFromMenuCreates a button's submenu from a handle to Windows menu.
 
 CreateMenuCreates a Windows menu from a list of commands associated with the toolbar menu button.
 
 GetCommandsGives read-only access to the list of commands associated with the toolbar menu button.
 
 GetImageRectRetrieves a rectangular area where the button's image is displayed.
 
 GetPaletteRowsReturns the number of rows for the drop-down menu working in palette mode.
 
 GetPopupMenuReturns a pointer to the button's popup menu.
 
 IsDroppedDownReturns nonzero when the toolbar menu button's submenu is displayed.
 
 IsExclusiveTells the framework whether a button is working in exclusive mode or not.
 
 IsMenuPaletteModeTells whether the drop-down menu, associated with the menu button, is in palette mode.
 
 IsTearOffMenuReturns nonzero if the toolbar menu button can have tear-off state.
 
 OnClickMenuItemCalled by the framework when the user selects (clicks) a menu item.
 
 OpenPopupMenuCalled by the framework when the user selects the toolbar menu button and it is required to open a popup menu.
 
 SetMenuOnlyEnables or disables "menu only" mode.
 
 SetMenuPaletteModeSets a drop-down menu, associated with the menu button to palette mode.
 
 SetRadioForces the toolbar menu button to display the radio-button image.
 
 SetTearOffSets a new tear-off bar ID.
 
- 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.
 
 ExportToMenuButtonCalled by the framework to copy the toolbar button into a menu button.
 
 GetControlValueRetrieves the toolbar control value
 
 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.
 
 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.
 
 IsExtraSizeDetermines whether the border's extra size should be taken into account.
 
 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.
 
 OnBeforeDropCalled by the framework before button is dropped on target.
 
 OnClickUpCalled by the framework when the user releases the toolbar button.
 
 OnCtlColorCalled by the framework when the parent toolbar processes OnCtlColor.
 
 OnDblClickCalled by the framework when the parent toolbar handles OnLButtonDblClk.
 
 OnDPIChangedCalled by the framework when the parent toolbar DPI is changed
 
 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.
 
 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 Member Functions

 GetCalendarByCmdID 
 
 SetCalendarByCmdIDGiven a button's command ID, changes the date of the calendar button.
 
- 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.
 

Additional Inherited Members

- 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.
 
- Static Public Attributes inherited from CBCGPToolbarMenuButton
 m_bAlwaysCallOwnerDrawForces the code that renders a toolbar menu button's image always call the main frame window to display the image.
 
- Static Public Attributes inherited from CBCGPToolbarButton
 m_bWrapTextIf TRUE, enables multi-line text labels.
 
- Protected Member Functions inherited from CBCGPToolbarMenuButton
 DrawDocumentIconDraws a document icon.