BCGControlBar Pro for MFC

Detailed Description

The CBCGPVisualManager class provides the functionality, which allows you to control look and feel of an application. It centralizes the drawing code for the most important GUI elements, such as toolbars, buttons, grippers and menus.

All the drawing member functions are virtual. All that you need is only to derive a class from the CBCGPVisualManager and override these functions.

There is only one instance of the CBCGPVisualManager or CBCGPVisualManager - derived class in the application at any time. You can access the current visual manager by calling the GetInstance() static member function.

See also
CBCGPVisualManager::GetInstance

The following example demonstrates how to instantiate the standard and custom CBCGPVisualManager objects:

Copy
void CMyApp::SetTheme(int iIndex)
{
switch (iIndex)
{
case 0: // Set MS Office 2016-like theme
SetVisualTheme(BCGP_VISUAL_THEME_OFFICE_2016_COLORFUL);
break;
case 1: // Set custom theme based on MS Visual Studio 2013-like theme
// CMyVisualManager is derived from CBCGPVisualManagerVS2013
SetVisualTheme(BCGP_VISUAL_THEME_VS_2013_BLUE, RUNTIME_CLASS(CMyVisualManager));
break;
}
}
+ Inheritance diagram for CBCGPVisualManager:

Public Member Functions

 AlwaysHighlight3DTabsCalled by the framework in order to determine whether 3D tabs should be always drawn with highlighted color.
 
 BreadcrumbDrawArrowCalled by the framework to draw arrow element of Breadcrumb Navigation Bar.
 
 BreadcrumbDrawArrowBackgroundCalled by the framework to draw background of Breadcrumb Navigation Bar arrow.
 
 BreadcrumbDrawItemCalled by the framework to draw an individual item of Breadcrumb Navigation Bar.
 
 BreadcrumbDrawItemBackgroundCalled by the framework to draw background of a Breadcrumb Navigation Bar item.
 
 BreadcrumbDrawLeftArrowCalled by the framework to draw left pointing arrow.
 
 BreadcrumbDrawLeftArrowBackgroundCalled by the framework to draw background of left pointing arrow.
 
 BreadcrumbFillBackgroundCalled to fill background of Breadcrumb Navigation Bar.
 
 BreadcrumbFillProgressCalled to fill progress bar of Breadcrumb Navigation Bar.
 
 DrawGanttChartBackgroundCalled by the framework to draw Gantt Chart background.
 
 DrawGanttHeaderCellCalled by the framework to draw a Gantt control header cell.
 
 DrawGanttHeaderTextCalled by the framework to draw text in a Gantt control header cell.
 
 DrawGanttItemBackgroundCellCalled by the framework to fill background of a Gantt cell.
 
 FillGanttBarCalled by the framework to fill a Gantt Control item.
 
 GetAutoHideButtonTextColorReturns text color of an autohide button.
 
 GetButtonExtraBorderReturns the extra size of buttons that is required to display this skin correctly.
 
 GetCalendarColorsCalled by the Calendar control when it needs to render itself.
 
 GetCaptionBarTextColorReturns text color of a caption bar.
 
 GetControlFillColorGets "typical" control background color.
 
 GetControlTextColorGets "typical" control foreground color.
 
 GetDlgBackBrushReturns a brush used to fill background of a themed dialog.
 
 GetDockingTabsBordersSizeReturns border size of docked tabbed bar.
 
 GetEditCtrlSelectionBkColorReturns background color of Advanced Edit control selection.
 
 GetEditCtrlSelectionTextColorReturns foreground color of Advanced Edit control selection.
 
 GetGanttColorsCalled by the framework to obtain colors (color scheme) to be used to draw Gantt Chart elements.
 
 GetMainButtonColorReturns color of main Ribbon button (pearl).
 
 GetMDITabsBordersSizeReturns border size of MDITabs window.
 
 GetMenuShadowDepthReturns a value that determines what is the width and height of the menu shadow.
 
 GetNcBtnSizeCalled to determine the size of caption (system) buttons provided by visual style.
 
 GetPopupMenuBorderSizeReturns border size for popup menus.
 
 GetPropListGroupColorReturns background color of property list's group.
 
 GetPropListGroupTextColorReturns text color of a property list's group.
 
 GetRibbonComboTextColorReturns a ribbon combobox foreground color.
 
 GetSmartDockingThemeReturns default docking theme for Visual Manager.
 
 GetTabFrameColorsReturns a set of colors to be used when drawing a tab frame.
 
 GetToolbarButtonTextColorReturns the color of the toolbar button's text according to the current visual manager and the button state.
 
 GetToolbarDisabledTextColorCalled by the framework to determine color disabled text displayed on disabled toolbar elements.
 
 GetURLLinkColorReturns a text color of URL link to be used by CBCGPURLLinkButton
 
 GetWindowCornerTypeCalled by the framework to obtain a specific window corner type (BCG_WINDOW_CORNER_TYPE).
 
 HasOverlappedAutoHideButtonsTells whether autohide buttons are overlapped.
 
 IsAutoGrayscaleImagesTells whether to convert all images to gray scale.
 
 IsAutohideScrollBarsTells whether the current Visual Manager supports auto-hidden scroll bar look.
 
 IsDockingTabHasBorderTells whether visualization code should draw a border around tabbed docking bars.
 
 IsDockingTabUpperCaseTells whether visualization code should draw a docking tab label in the upper case.
 
 IsEditSyntaxHilightingOnSelectionTells whether syntax hilighting in selected (colored) areas of advanced edit control is available for this visual theme.
 
 IsEmbossDisabledImageDetermines whether disabled images should be embossed.
 
 IsFadeInactiveImageDetermines whether toolbar/menu inactive images are drawn with the lighting (fading) effect.
 
 IsLook2000Tells whether the application's GUI elements have Microsoft Office 2000 look and feel.
 
 IsLook2000AllowedSpecifies whether "look 2000" option in the customization dialog is enabled.
 
 IsMenuFlatLookTells whether the menu buttons have the flat look (menu buttons don't look pressed).
 
 IsOfficeXPStyleMenusTells whether the visual manager uses displays OfficeXP-style menus.
 
 IsOwnerDrawCaptionTells whether current visual style implements owner draw caption of a frame window.
 
 IsOwnerDrawScrollBarTells whether the current Visual Manager supports custom scroll bar look.
 
 IsShadowHighlightedImageDetermines whether the shadow should be displayed when rendering highlighted images.
 
 OnDrawAppBarBorderDraws application bar border.
 
 OnDrawAppBarCaptionDraws application bar caption.
 
 OnDrawAutoHideButtonBorderCalled by the framework when it needs to draw the border for an autohide button.
 
 OnDrawBarBorderCalled by the framework when it displays the border of a control bar.
 
 OnDrawBarGripperCalled by the framework to display a control bar's gripper.
 
 OnDrawBrowseButtonCalled by the framework when it draws a browse button which belongs to an edit control (CBCGPEdit).
 
 OnDrawButtonBorderCalled by the framework to display the border of a toolbar button.
 
 OnDrawCalculatorButtonCalled by the framework when it needs to draw a calculator button
 
 OnDrawCalculatorDisplayCalled by the framework when it needs to draw calculator's display.
 
 OnDrawCaptionBarBorderCalled by the framework when it needs to draw the caption bar border.
 
 OnDrawCaptionButtonCalled by the framework to draw a caption button.
 
 OnDrawComboBorderCalled by the framework to display the border of a combo box button.
 
 OnDrawComboDropButtonCalled by the framework to display the combo box drop button.
 
 OnDrawControlBarCaptionCalled by the framework to draw the control bar caption.
 
 OnDrawControlBarCaptionTextCalled to draw a text on a caption of control bar.
 
 OnDrawDefaultRibbonImageCalled by the framework to draw default ribbon image.
 
 OnDrawDlgSizeBoxCalled by the framework to draw size box on resizable dialogs.
 
 OnDrawDockingBarScrollButtonCalled by the framework when it needs to draw a docking control bar scroll button.
 
 OnDrawEditBorderCalled by the framework to draw a border around a toolbar edit box button.
 
 OnDrawFloatingToolbarBorderDraws borders of a mini-frame window containing a toolbar (floating toolbar).
 
 OnDrawGridHeaderMenuButtonCalled by the framework to draw a menu button located on grid header.
 
 OnDrawGridSelectionBorderCalled by the framework to draw border around selected items in grid control.
 
 OnDrawGroupCalled by the framework to draw a Group control.
 
 OnDrawHeaderCtrlBorderCalled by the framework when it needs to draw the border around the header control.
 
 OnDrawHeaderCtrlSortArrowCalled by the framework to display the header control sort arrow.
 
 OnDrawLightBoxDialogCloseButtonCalled by the framework when it needs to draw light box dialog (CBCGPLightBoxDialog) "Close" button.
 
 OnDrawMenuBorderCalled by the framework to display a menu border.
 
 OnDrawMenuScrollButtonCalled by the framework to draw menu scroll button.
 
 OnDrawMenuSystemButtonCalled by the framework to display the menu system buttons.
 
 OnDrawOutlookBarSplitterCalled by the framework when it needs to draw the outlook bar splitter.
 
 OnDrawOutlookPageButtonBorderDraws border of an outlook page button.
 
 OnDrawPropSheetListItemCalled by the framework do draw an item displayed on the list located at the left side of property sheet working in PropSheetLook_List mode.
 
 OnDrawPushButtonCalled by the framework to draw a push button.
 
 OnDrawRadioButtonCalled by the framework to draw a radio button.
 
 OnDrawRibbonButtonBorderCalled by the framework to draw ribbon button border.
 
 OnDrawRibbonButtonsGroupCalled by the framework when it needs to draw group of buttons.
 
 OnDrawRibbonCaptionCalled by the framework to draw caption of main frame when ribbon bar is integrated with the frame.
 
 OnDrawRibbonCaptionButtonCalled by the framework when it needs to draw a caption button located on ribbon bar.
 
 OnDrawRibbonCategoryCalled by the framework when it needs to draw a ribbon category
 
 OnDrawRibbonCategoryCaptionCalled by the library to draw the ribbon category caption (for context categories).
 
 OnDrawRibbonCategoryTabCalled by the framework to draw ribbon category tab.
 
 OnDrawRibbonComboDropButtonCalled by the framework to draw ribbon combobox drop button.
 
 OnDrawRibbonDefaultPaneButtonCalled by the framework to draw ribbon pane default button. Default button is displayed when a ribbon pane (panel) is stretched to its minimal size and there is no place to display panel's content. The panel's content is displayed on a drop down menu, which appears when user clicks the default button.
 
 OnDrawRibbonLabelCalled by the framework to draw ribbon label.
 
 OnDrawRibbonLaunchButtonCalled by the framework to draw ribbon launch button.
 
 OnDrawRibbonMainButtonCalled by the framework to draw ribbon Main Button.
 
 OnDrawRibbonMainPanelButtonBorderCalled by the framework to draw border of ribbon button located on the main panel.
 
 OnDrawRibbonMainPanelFrameCalled by the framework to draw frame around main panel.
 
 OnDrawRibbonPanelCalled by the framework to draw a ribbon panel.
 
 OnDrawRibbonPanelCaptionCalled by the framework to draw ribbon panel's caption.
 
 OnDrawRibbonProgressBarDraws ribbon progress bar element.
 
 OnDrawRibbonQATSeparatorCalled by the framework to draw a separator on ribbon's QAT (Quick Access Toolbar).
 
 OnDrawRibbonRecentFilesFrameCalled by the framework to draw frame around recent files list.
 
 OnDrawRibbonSliderChannelDraws ribbon slider's channel.
 
 OnDrawRibbonSliderThumbDraws ribbon slider's thumb.
 
 OnDrawRibbonSliderZoomButtonDraws ribbon slider zoom buttons.
 
 OnDrawRibbonStatusBarPaneDraws ribbon status bar pane.
 
 OnDrawRibbonTabsFrameCalled to draw frame around ribbon tabs.
 
 OnDrawSeparatorCalled by the framework to display a separator.
 
 OnDrawSliderChannelCalled by the framework to draw a slider channel.
 
 OnDrawSliderThumbCalled by the framework to draw a slider's thumb.
 
 OnDrawSpinButtonsCalled by the framework to draw spin buttons.
 
 OnDrawSplitterBorderCalled by the framework when it need to display the border of a split window.
 
 OnDrawSplitterBoxCalled by the framework when it need to display the splitter drag box of split window.
 
 OnDrawStatusBarPaneBorderCalled by the framework to display a border for a status-bar pane.
 
 OnDrawStatusBarProgressCalled by the framework to display the status-bar progress indicator.
 
 OnDrawStatusBarSizeBoxCalled by the framework to display the status bar size box.
 
 OnDrawTabCalled by the framework when a tab that belongs to a CBCGPTabWnd object should be redrawn.
 
 OnDrawTabCloseButtonCalled by the framework when it needs to draw the close button on active tab.
 
 OnDrawTabContentCalled by the framework when it needs to draw the tab interior (images, texts).
 
 OnDrawTabsButtonBorderCalled by the framework to draw a border of a tab button.
 
 OnDrawTaskCalled by the framework to draw a task on the task pane.
 
 OnDrawTasksGroupAreaBorderCalled by the framework to draw the border around group area of the task pane.
 
 OnDrawTasksGroupCaptionCalled by the framework to draw the caption of task group on the task pane.
 
 OnDrawTearOffCaptionCalled by the framework when it need to redraw tear-off caption for a tear-off bar.
 
 OnDrawToolBoxButtonBorderCalled by the framework when the border of a toolbox button is about to be drawn.
 
 OnEraseMDIClientAreaCalled by the framework to fill background of MDI client area.
 
 OnEraseTabsAreaCalled by the framework when the tab area in tab window needs to be erased.
 
 OnEraseTabsButtonCalled by the framework before it fills the background of a tab button.
 
 OnEraseTabsFrameCalled by the framework when a tab frame is being erased.
 
 OnEraseToolBoxButtonCalled by the framework when the background of a toolbox button is erased.
 
 OnFillAutoHideButtonBackgroundCalled by the framework when it needs to fill background of an autohide button.
 
 OnFillBarBackgroundCalled by the framework to fill the background of a control bar.
 
 OnFillButtonInteriorCalled by the framework to fill the background of toolbar button.
 
 OnFillCommandsListBackgroundCalled by the framework when a toolbar button should be redrawn within the command list on the customization dialog.
 
 OnFillDialogCalled by the framework to fill background of a themed dialog.
 
 OnFillHeaderCtrlBackgroundCalled by the framework when it needs to fill the background of a header control.
 
 OnFillListBoxItemCalled by the framework to fill background of owner draw list box items.
 
 OnFillMiniFrameCaptionCalled by the framework to fill the mini-frame window caption.
 
 OnFillOutlookBarCaptionCalled by the framework when it needs to fill the background of outlook bar caption.
 
 OnFillOutlookPageButtonCalled by the framework to fill the interior of an outlook page button.
 
 OnFillPlannerCalled by the framework to fill background of planner control.
 
 OnFillPlannerWeekBarCalled by the framework to fill the planner week bar.
 
 OnFillPopupWindowBackgroundCalled by the framework when it needs to fill background of popup window.
 
 OnFillPropListCalled to fill background of property list.
 
 OnFillRibbonBackstageFormCalled by the framework when it needs to draw background for a child dialog placed on backstage view.
 
 OnFillRibbonButtonCalled by the framework to fill the ribbon button interior.
 
 OnFillRibbonMainPanelButtonCalled by the framework to fill interior of ribbon button located on the main panel.
 
 OnFillRibbonMenuFrameCalled by the framework to fill menu frame of main ribbon panel.
 
 OnFillSplitterBackgroundCalled by the framework when it needs to fill background of a split window.
 
 OnFillTabCalled by the framework when it need to fill background of tab.
 
 OnFillTasksGroupInteriorCalled by the framework to fill the interior of a task group on the task pane.
 
 OnFillTasksPaneBackgroundCalled by the framework to fill the background of a task pane control.
 
 OnHighlightMenuItemCalled by the framework to draw a highlighted menu item.
 
 OnHighlightRarelyUsedMenuItemsCalled by the framework to display a highlighted rarely used menu item.
 
 OnNcPaintCalled by the framework to paint non-client area of a window. The method paints frame caption and borders.
 
 OnSetWindowRegionCalled by the framework when a region has been set for frames and popup menus.
 
 OnUpdateSystemColorsCalled by the framework when a change is made to a system color setting.
 
 SetEmbossDisabledImageEnables or disables the "embossed" mode for disabled toolbar images .
 
 SetFadeInactiveImageEnables or disables the lighting (fading) effect for toolbar/menu inactive (non-highlighted) images.
 
 SetLook2000Sets a flag indicating whether the application GUI elements have Microsoft Office 2000 look and feel.
 
 SetMainButtonColorSets color of main Ribbon button (pearl).
 
 SetMenuFlatLookSets a flag indicating whether the application menu buttons have the flat look.
 
 SetMenuShadowDepthSets the width and height of the menu shadow.
 
 SetShadowHighlightedImageSets a flag that indicates whether to display the shadow when rendering highlighted images.
 

Static Public Member Functions

 GetInstanceReturns a pointer to the visual manager object.
 
 RedrawAllForces all control bars in the application to be redrawn.
 
 SetDefaultManagerSets the default visual manager.