BCGControlBar Pro for MFC
CBCGPToolbarFontSizeCombo

Detailed Description

The CBCGPToolbarFontSizeCombo class provides the functionality that allows to place combo boxes with a list of font sizes on toolbars, which were created using BCGControlBar Library framework.

The fond size combo objects should be used in conjunction with the CBCGPToolbarFontCombo objects. When a new font is selected in the font combo, you should fill the font size combo with the corresponding font sizes using the RebuildFontSizes() member function.

You can use font size combos in applications in the same way as the CBCGPToolbarFontCombo class.

See also
CBCGPToolBar, CBCGPToolbarButton, CBCGPToolbarComboBoxButton, CBCGPToolbarFontCombo, CBCGPFontDesc
+ Inheritance diagram for CBCGPToolbarFontSizeCombo:

Public Member Functions

 CBCGPToolbarFontSizeComboConstructs a CBCGPToolbarFontSizeCombo object.
 
 GetTwipSizeRetrieves the font size from the edit box of a font size combo box in twips.
 
 GetTwipsLastReturns the last valid font size (in twips), which was selected in the font size combo.
 
 RebuildFontSizesGiven a font name, fills a font size combo with all valid sizes of the font.
 
 SetTwipSizeForces a font size combo to set the specified font size to be the current font size.
 
- Public Member Functions inherited from CBCGPToolbarComboBoxButton
 CBCGPToolbarComboBoxButtonConstructs a CBCGPToolbarComboBoxButton.
 
 AddItemAdds an item at the end of the list in the list box of a combo box.
 
 AddSortedItemAdds a new item sorted in a specific order to the list box of combo.
 
 CompareCalled by the framework, when it needs to compare two items inserted by AddSortedItems().
 
 CreateEditCalled by the framework when it needs to create a new edit control for combo box button.
 
 DeleteItemDeletes an item for the combo box.
 
 DeleteItemDeletes an item for the combo box.
 
 DeleteItemDeletes an item for the combo box.
 
 FindItemLooks for an item in the list box part of combo box.
 
 FindItemDataLooks for an item with specified data in the list box part of combo box.
 
 GetComboBoxReturns a pointer to the button's combo box control.
 
 GetCountRetrieves the number of items in the list box of a combo box.
 
 GetCurSelRetrieves the index of the currently selected item, if any, in the list box of a combo box.
 
 GetCustomFontRetrieves control custom font.
 
 GetEditCtrlReturns a pointer to the embedded edit control.
 
 GetItemGets the string associated with the specified item in a combo box.
 
 GetItemDataRetrieves the value associated with the specified item in a combo box.
 
 GetPromptReturns a prompt (displayed when the combo box text is empty).
 
 GetPromptColorRetrieves the prompt color.
 
 GetTextRetrieves the text from the edit control of a combo box.
 
 RemoveAllItemsRemoves all items from the list box and edit control of a combo box.
 
 SelectItemSearches the list of items of a combo box button and selects one of them according to the specified index.
 
 SelectItemSearches the list of items of a combo box button and selects one of them according to the specified value.
 
 SelectItemSearches the list of items of a combo box button and selects one of them according to the specified string.
 
 SetCustomFontSets a custom font.
 
 SetDropDownHeightSets the new height of the dropdown list box of a combo box.
 
 SetPromptSets a prompt displayed when the combo box text is empty.
 
- Public Member Functions inherited from CBCGPToolbarButton
 CBCGPToolbarButtonConstructs and initializes a CBCGPToolbarButton object.
 
 CanBeDroppedIndicates whether a button can be dropped on a toolbar.
 
 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.
 
 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.
 
 OnBeforeDragCalled by the framework before user begins to drag the button.
 
 OnBeforeDropCalled by the framework before button is dropped on target.
 
 OnClickUpCalled by the framework when the user releases the toolbar button.
 
 OnContextHelpCalled by the framework when the parent toolbar processes the WM_HELPHITTEST message.
 
 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.
 
 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.
 
 SetVisibleShows or hides a toolbar button.
 
 ShowMakes a button visible or hidden.
 

Additional Inherited Members

- Static Public Member Functions inherited from CBCGPToolbarComboBoxButton
 GetByCmdGiven a command ID returns a pointer to a combo box button from the list of toolbar buttons.
 
 GetCountAllLooks for a combo box button with the given command ID and retrieves the number of items in the list box of a combo box.
 
 GetCurSelAllLooks for a combo box button with the given command ID and retrieves the index of the currently selected item, if any, in the list box of a combo box.
 
 GetItemAllLooks for a combo box button with the given command ID and gets the string associated with the specified item a combo box.
 
 GetItemDataAllLooks for a combo box button with the given command ID and retrieves the value associated with the specified item in a combo box.
 
 GetItemDataPtrAllLooks for a combo box button with the given command ID and retrieves the value associated with the specified item in a combo box as a pointer.
 
 GetTextAllLooks for a combo box button with the given command ID and retrieves the text from the edit control of a combo box.
 
 IsCenterVertTells whether the button is centered, or aligned at the top of toolbar.
 
 IsFlatModeTells whether the toolbar combo box buttons have the flat look.
 
 IsFullHeightTells whether the height of the combo box is the same as the height of other toolbar buttons.
 
 SelectItemAllLooks for a combo box button with the given command ID and select one of a combo box items according to the specified index.
 
 SelectItemAllLooks for a combo box button with the given command ID and select one of a combo box items according to the specified value.
 
 SelectItemAllLooks for a combo box button with the given command ID and select one of a combo box items according to the specified string.
 
 SetCenterVertSpecifies whether the button should be centered vertically or aligned to the top of toolbar.
 
 SetFlatModeSets the flat look for the toolbar combo box buttons.
 
 SetFullHeightSpecifies whether the height of the combo box is the same as the height of other toolbar buttons.
 
- 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.
 
- Static Public Attributes inherited from CBCGPToolbarButton
 m_bWrapTextIf TRUE, enables multi-line text labels.