CMFCVisualManager Class

Provides support for changing the appearance of your application at a global level. The CMFCVisualManager class works together with a class that provides instructions to draw the GUI controls of your application using a consistent style. These other classes are referred to as visual managers and they inherit from CMFCBaseVisualManager.

For more detail see the source code located in the VC\atlmfc\src\mfc folder of your Visual Studio installation.

Syntax

class CMFCVisualManager : public CMFCBaseVisualManager

Members

Public Constructors

Name Description
CMFCVisualManager::CMFCVisualManager Default constructor.

Public Methods

Name Description
CMFCVisualManager::AdjustFrames
CMFCVisualManager::AdjustToolbars
CMFCVisualManager::AlwaysHighlight3DTabs Called by the framework to determine whether 3D tabs should always be drawn by using a highlight color.
CMFCVisualManager::DestroyInstance
CMFCVisualManager::DoDrawHeaderSortArrow
CMFCVisualManager::DrawComboDropButtonWinXP
CMFCVisualManager::DrawPushButtonWinXP
CMFCVisualManager::DrawTextOnGlass
CMFCVisualManager::GetAutoHideButtonTextColor Called by the framework to retrieve the text color for an auto-hide button.
CMFCVisualManager::GetButtonExtraBorder Called by the framework to retrieve the increased button size that the current visual manager requires to draw a button.
CMFCVisualManager::GetCaptionBarTextColor Called by the framework to retrieve the text color of a caption bar.
CMFCVisualManager::GetDockingTabsBordersSize Called by the framework to retrieve the size for the border of a docked tabbed bar.
CMFCVisualManager::GetHighlightedMenuItemTextColor
CMFCVisualManager::GetInstance Returns a pointer to the CMFCVisualManager object.
CMFCVisualManager::GetMDITabsBordersSize Called by the framework to retrieve the border size of the MDITabs window.
CMFCVisualManager::GetMenuItemTextColor
CMFCVisualManager::GetMenuShadowDepth Returns a value that determines the width and height of a menu shadow.
CMFCVisualManager::GetNcBtnSize Called by the framework to determine the size of the system buttons based on the current visual manager. The system buttons are the buttons in the caption of the main frame that map to the commands Close, Minimize, Maximize, and Restore.
CMFCVisualManager::GetPopupMenuBorderSize Called by the framework to retrieve the size of the border for a popup menu.
CMFCVisualManager::GetPropertyGridGroupColor Called by the framework to retrieve the background color of a property list.
CMFCVisualManager::GetPropertyGridGroupTextColor Called by the framework to retrieve the text color of a property list.
CMFCVisualManager::GetRibbonHyperlinkTextColor
CMFCVisualManager::GetRibbonPopupBorderSize
CMFCVisualManager::GetRibbonQuickAccessToolBarTextColor
CMFCVisualManager::GetRibbonSliderColors
CMFCVisualManager::GetShowAllMenuItemsHeight
CMFCVisualManager::GetSmartDockingBaseGuideColors
CMFCVisualManager::GetSmartDockingHighlightToneColor
CMFCVisualManager::GetSmartDockingTheme Returns a theme used to display smart docking markers.
CMFCVisualManager::GetStatusBarPaneTextColor
CMFCVisualManager::GetTabFrameColors Called by the framework to retrieve the set of colors to use when it draws a tab frame.
CMFCVisualManager::GetTabTextColor
CMFCVisualManager::GetToolbarButtonTextColor Called by the framework to retrieve the current color of the text on the toolbar button. This color varies based on the current visual manager and the button state.
CMFCVisualManager::GetToolbarDisabledTextColor Called by the framework to determine the color of the text that is displayed on disabled toolbar elements.
CMFCVisualManager::GetToolbarHighlightColor
CMFCVisualManager::GetToolTipInfo
CMFCVisualManager::HasOverlappedAutoHideButtons Specifies whether auto-hide buttons overlap.
CMFCVisualManager::IsDockingTabHasBorder Specifies whether the current visual manager draws a border around tabbed docking bars.
CMFCVisualManager::IsEmbossDisabledImage Specifies whether disabled images should be embossed.
CMFCVisualManager::IsFadeInactiveImage Called by the framework to determine whether inactive images on a toolbar or menu appear dimmed.
CMFCVisualManager::IsMenuFlatLook Specifies whether menu buttons have a flattened appearance.
CMFCVisualManager::IsOfficeXPStyleMenus Specifies whether the visual manager implements Office XP-style menus.
CMFCVisualManager::IsOwnerDrawCaption Specifies whether the current visual manager implements owner-drawn captions of a frame window.
CMFCVisualManager::IsShadowHighlightedImage Specifies whether a highlighted image has a shadow.
CMFCVisualManager::OnDrawAutoHideButtonBorder Called by the framework when it draws the border for an auto-hide button.
CMFCVisualManager::OnDrawBarGripper Called by the framework when it draws the gripper of a control bar. The user must click the gripper in order to move the control bar.
CMFCVisualManager::OnDrawBrowseButton Called by the framework when it draws a browse button that belongs to an edit control ( CMFCEditBrowseCtrl Class).
CMFCVisualManager::OnDrawButtonBorder Called by the framework when it draws the border of a toolbar button.
CMFCVisualManager::OnDrawButtonSeparator
CMFCVisualManager::OnDrawCaptionBarBorder Called by the framework when it draws the caption bar border.
CMFCVisualManager::OnDrawCaptionBarButtonBorder
CMFCVisualManager::OnDrawCaptionBarInfoArea
CMFCVisualManager::OnDrawCaptionButton Called by the framework when it draws a caption button.
CMFCVisualManager::OnDrawCheckBox
CMFCVisualManager::OnDrawCheckBoxEx
CMFCVisualManager::OnDrawComboBorder Called by the framework when it draws the border of a combo box button.
CMFCVisualManager::OnDrawComboDropButton Called by the framework when it draws a combo box drop button.
CMFCVisualManager::OnDrawControlBorder
CMFCVisualManager::OnDrawDefaultRibbonImage Called by the framework when it draws the default ribbon image.
CMFCVisualManager::OnDrawEditBorder Called by the framework when it draws a border around a CMFCToolBarEditBoxButton object.
CMFCVisualManager::OnDrawExpandingBox
CMFCVisualManager::OnDrawFloatingToolbarBorder Called by the framework when it draws the borders of a floating toolbar. The floating toolbar is a toolbar that appears as a mini-frame window.
CMFCVisualManager::OnDrawHeaderCtrlBorder Called by the framework when it draws the border that contains the header control.
CMFCVisualManager::OnDrawHeaderCtrlSortArrow Called by the framework when it draws the header control sort arrow.
CMFCVisualManager::OnDrawMenuArrowOnCustomizeList
CMFCVisualManager::OnDrawMenuBorder Called by the framework when it draws a menu border.
CMFCVisualManager::OnDrawMenuCheck
CMFCVisualManager::OnDrawMenuItemButton
CMFCVisualManager::OnDrawMenuLabel
CMFCVisualManager::OnDrawMenuResizeBar
CMFCVisualManager::OnDrawMenuScrollButton Called by the framework when it draws a menu scroll button.
CMFCVisualManager::OnDrawMenuShadow
CMFCVisualManager::OnDrawMenuSystemButton Called by the framework when it draws the menu system buttons Close, Minimize, Maximize, and Restore.
CMFCVisualManager::OnDrawMiniFrameBorder
CMFCVisualManager::OnDrawOutlookBarSplitter Called by the framework when it draws the splitter for an Outlook bar. The splitter is a horizontal bar used to group controls.
CMFCVisualManager::OnDrawOutlookPageButtonBorder Called by the framework when it draws the border of an Outlook page button. Outlook page buttons appear if the Outlook bar pane contains more buttons than it can display.
CMFCVisualManager::OnDrawPaneBorder Called by the framework when it draws the border of a CPane Class.
CMFCVisualManager::OnDrawPaneCaption Called by the framework when it draws the caption for a CPane.
CMFCVisualManager::OnDrawPaneDivider
CMFCVisualManager::OnDrawPopupWindowBorder
CMFCVisualManager::OnDrawPopupWindowButtonBorder
CMFCVisualManager::OnDrawPopupWindowCaption
CMFCVisualManager::OnDrawRibbonApplicationButton Called by the framework when it draws the Main Button on the ribbon.
CMFCVisualManager::OnDrawRibbonButtonBorder Called by the framework when it draws the border of a ribbon button.
CMFCVisualManager::OnDrawRibbonButtonsGroup Called by the framework when it draws a group of buttons on the ribbon.
CMFCVisualManager::OnDrawRibbonCaption Called by the framework when it draws the caption of the main frame, but only if the ribbon bar is integrated with the frame.
CMFCVisualManager::OnDrawRibbonCaptionButton Called by the framework when it draws a caption button located on the ribbon bar.
CMFCVisualManager::OnDrawRibbonCategory Called by the framework when it draws a ribbon category.
CMFCVisualManager::OnDrawRibbonCategoryCaption Called by the framework when it draws the caption for a ribbon category.
CMFCVisualManager::OnDrawRibbonCategoryScroll
CMFCVisualManager::OnDrawRibbonCategoryTab Called by the framework when it draws the tab for a ribbon category.
CMFCVisualManager::OnDrawRibbonCheckBoxOnList
CMFCVisualManager::OnDrawRibbonColorPaletteBox
CMFCVisualManager::OnDrawRibbonDefaultPaneButtonContext
CMFCVisualManager::OnDrawRibbonDefaultPaneButton Called by the framework when it draws the ribbon pane default button. The default button appears when the user shrinks a ribbon panel so that it is too small to display the ribbon elements. The default button is drawn instead and the ribbon elements are added as items on a drop down menu.
CMFCVisualManager::OnDrawRibbonDefaultPaneButtonIndicator
CMFCVisualManager::OnDrawRibbonGalleryBorder
CMFCVisualManager::OnDrawRibbonGalleryButton
CMFCVisualManager::OnDrawRibbonKeyTip
CMFCVisualManager::OnDrawRibbonLabel Called by the framework when it draws the ribbon label.
CMFCVisualManager::OnDrawRibbonMainPanelButtonBorder Called by the framework when it draws the border of a ribbon button that is positioned on the Main panel. The Main panel is the panel that appears when a user clicks the Main Button.
CMFCVisualManager::OnDrawRibbonMainPanelFrame Called by the framework when it draws the frame around the Main panel.
CMFCVisualManager::OnDrawRibbonMenuCheckFrame
CMFCVisualManager::OnDrawRibbonPanel Called by the framework when it draws a ribbon panel.
CMFCVisualManager::OnDrawRibbonPanelCaption Called by the framework when it draws the caption of a ribbon panel.
CMFCVisualManager::OnDrawRibbonProgressBar Called by the framework when it draws a CMFCRibbonProgressBar object.
CMFCVisualManager::OnDrawRibbonQuickAccessToolBarSeparator Called by the framework when it draws a separator on a ribbon's Quick Access Toolbar.
CMFCVisualManager::OnDrawRibbonRecentFilesFrame Called by the framework when it draws a frame around a recent files list.
CMFCVisualManager::OnDrawRibbonSliderChannel Called by the framework when it draws the channel of a CMFCRibbonSlider object.
CMFCVisualManager::OnDrawRibbonSliderThumb Called by the framework when it draws the thumb of a CMFCRibbonSlider object.
CMFCVisualManager::OnDrawRibbonSliderZoomButton Called by the framework when it draws the zoom buttons of a CMFCRibbonSlider object.
CMFCVisualManager::OnDrawRibbonStatusBarPane Called by the framework when it draws the status-bar pane of a ribbon.
CMFCVisualManager::OnDrawRibbonTabsFrame Called by the framework when it draws a frame around a set of ribbon tabs.
CMFCVisualManager::OnDrawScrollButtons
CMFCVisualManager::OnDrawSeparator Called by the framework when it draws a separator. The separator is typically used on a control bar to separate groups of icons.
CMFCVisualManager::OnDrawShowAllMenuItems
CMFCVisualManager::OnDrawSpinButtons Called by the framework when it draws spin buttons.
CMFCVisualManager::OnDrawSplitterBorder Called by the framework when it draws the border of a split window.
CMFCVisualManager::OnDrawSplitterBox Called by the framework when it draws the splitter drag box for a split window.
CMFCVisualManager::OnDrawStatusBarPaneBorder Called by the framework when it draws the border for a status-bar pane.
CMFCVisualManager::OnDrawStatusBarProgress Called by the framework when it draws the status-bar progress indicator.
CMFCVisualManager::OnDrawStatusBarSizeBox Called by the framework when it draws the status-bar size box.
CMFCVisualManager::OnDrawTab Called by the framework when it draws a CMFCTabCtrl object.
CMFCVisualManager::OnDrawTabCloseButton Called by the framework when it draws the Close button on the active tab.
CMFCVisualManager::OnDrawTabContent Called by the framework when it draws the tab interior (images, texts).
CMFCVisualManager::OnDrawTabsButtonBorder Called by the framework when it draws the border of a tab button.
CMFCVisualManager::OnDrawTask Called by the framework when it draws a task on the task pane.
CMFCVisualManager::OnDrawTasksGroupAreaBorder Called by the framework when it draws a border around a group area on the task pane.
CMFCVisualManager::OnDrawTasksGroupCaption Called by the framework when it draws the caption for a task group on the task pane.
CMFCVisualManager::OnDrawTasksGroupIcon
CMFCVisualManager::OnDrawTearOffCaption Called by the framework when it draws the tear-off caption for a tear-off bar.
CMFCVisualManager::OnDrawToolBoxFrame
CMFCVisualManager::OnEraseMDIClientArea Called by the framework when it erases the MDI client area.
CMFCVisualManager::OnErasePopupWindowButton
CMFCVisualManager::OnEraseTabsArea Called by the framework when it erases the tab area in a tab window.
CMFCVisualManager::OnEraseTabsButton Called by the framework when it erases the icon and text of a tab button.
CMFCVisualManager::OnEraseTabsFrame Called by the framework when it erases a tab frame.
CMFCVisualManager::OnFillAutoHideButtonBackground Called by the framework when it fills the background of an auto-hide button.
CMFCVisualManager::OnFillBarBackground Called by the framework when it fills the background of a control bar.
CMFCVisualManager::OnFillButtonInterior Called by the framework when it fills the background of a toolbar button.
CMFCVisualManager::OnFillCaptionBarButton
CMFCVisualManager::OnFillCommandsListBackground Called by the framework when it fills the background of a toolbar button that belongs to a command list that, in turn, is part of a customization dialog box.
CMFCVisualManager::OnFillHeaderCtrlBackground Called by the framework when it fills the background of a header control.
CMFCVisualManager::OnFillMiniFrameCaption Called by the framework when it fills the caption of a mini frame window.
CMFCVisualManager::OnFillOutlookBarCaption Called by the framework when it fills the background of an Outlook bar caption.
CMFCVisualManager::OnFillOutlookPageButton Called by the framework when it fills the interior of an Outlook page button.
CMFCVisualManager::OnFillPopupWindowBackground Called by the framework when it fills the background of a popup window.
CMFCVisualManager::OnFillRibbonButton Called by the framework when it fills the interior of a ribbon button.
CMFCVisualManager::OnFillRibbonEdit Called by the framework when it fills the interior of a ribbon edit control.
CMFCVisualManager::OnFillRibbonMainPanelButton Called by the framework when it fills the interior of a ribbon button located on the Main panel.
CMFCVisualManager::OnFillRibbonMenuFrame Called by the framework when it fills the menu frame of the main ribbon panel.
CMFCVisualManager::OnFillRibbonQuickAccessToolBarPopup
CMFCVisualManager::OnFillSplitterBackground Called by the framework when it fills the background of a split window.
CMFCVisualManager::OnFillTab Called by the framework when it fills the background of a tab.
CMFCVisualManager::OnFillTasksGroupInterior Called by the framework when it fills the interior of a CMFCTasksPaneTaskGroup object on the CMFCTasksPane.
CMFCVisualManager::OnFillTasksPaneBackground Called by the framework when it fills the background of a CMFCTasksPane control.
CMFCVisualManager::OnHighlightMenuItem Called by the framework when it draws a highlighted menu item.
CMFCVisualManager::OnHighlightRarelyUsedMenuItems Called by the framework when it draws a highlighted and rarely used menu item.
CMFCVisualManager::OnNcPaint Called by the framework when it draws the non-client area.
CMFCVisualManager::OnSetWindowRegion Called by the framework when it sets a region that contains frames and popup menus.
CMFCVisualManager::OnUpdateSystemColors Called by the framework when it changes the system color setting.
CMFCVisualManager::RedrawAll Redraws all control bars in the application.
CMFCVisualManager::RibbonCategoryColorToRGB
CMFCVisualManager::SetDefaultManager Sets the default visual manager.
CMFCVisualManager::SetEmbossDisabledImage Enables or disables the embossed mode for disabled toolbar images.
CMFCVisualManager::SetFadeInactiveImage Enables or disables the lighting effect for inactive images on a menu or toolbar.
CMFCVisualManager::SetMenuFlatLook Sets a flag indicating whether the application menu buttons have a flattened appearance.
CMFCVisualManager::SetMenuShadowDepth Sets the width and height of the menu shadow.
CMFCVisualManager::SetShadowHighlightedImage Sets a flag that indicates whether to display the shadow when rendering highlighted images.

Remarks

Because the CMFCVisualManager class controls the application's GUI, each application can have either one instance of a CMFCVisualManager, or one instance of a class derived from CMFCVisualManager. Your application can also function without a CMFCVisualManager. Use the static method GetInstance to obtain a pointer to the current CMFCVisualManager-derived object.

To change the appearance of your application you must use other classes that provide methods for drawing all of the visual elements of your application. Some examples of these classes are CMFCVisualManagerOfficeXP Class, CMFCVisualManagerOffice2003 Class, and CMFCVisualManagerOffice2007 Class. When you want to change the appearance of your application, pass one of these visual managers into the method SetDefaultManager. For an example that demonstrates how your application can mimic the appearance of Microsoft Office 2003, see CMFCVisualManagerOffice2003 Class.

All of the drawing methods are virtual. This enables you to create a custom visual style for the GUI of your application. If you want to create your own visual style, derive a class from one of the visual manager classes and override the drawing methods that you want to change.

Examples

This sample demonstrates how to instantiate the standard and custom CMFCVisualManager objects.

void CMFCSkinsApp::SetSkin (int iIndex)
{   // destroy the current visual manager
    if (CMFCVisualManager::GetInstance () != NULL)
    {
        delete CMFCVisualManager::GetInstance ();
    }
    switch (iIndex)
    {
    case 0:
        CMFCVisualManager::GetInstance ();
        // create the standard visual manager
        break;
    case 1:
        new CMyVisualManager ();
        // create the first custom visual manager
        break;
    case 2:
        new CMacStyle ();
        // create the second custom visual manager
        break;
    }
    // access the manager and set it properly
    CMFCVisualManager::GetInstance ()->SetLook2000 ();
    CMFCVisualManager::GetInstance ()->RedrawAll ();
}

The following example demonstrates how to retrieve the default values of a CMFCVisualManager object. This code snippet is part of the Tasks Pane sample.

int m_nVMargin;
int m_nHMargin;
int m_nGroupSpacing;
int m_nTaskSpacing;
int m_nCaptionHeight;
int m_nTaskOffset;
int m_nIconOffset;

Inheritance Hierarchy

CObject

CMFCBaseVisualManager

CMFCVisualManager

Requirements

Header: afxvisualmanager.h

CMFCVisualManager::AdjustFrames

static void __stdcall AdjustFrames();

Remarks

CMFCVisualManager::AdjustToolbars

static void __stdcall AdjustToolbars();

Remarks

CMFCVisualManager::AlwaysHighlight3DTabs

The framework calls this method to determine whether 3D tabs should always be highlighted in the application.

virtual BOOL AlwaysHighlight3DTabs() const;

Return Value

TRUE if 3D tabs should be highlighted.

Remarks

Override this function in a derived visual manager and return TRUE if 3D tabs should always be highlighted. The default implementation of this method returns FALSE.

CMFCVisualManager::CMFCVisualManager

CMFCVisualManager(BOOL bTemporary = FALSE);

Parameters

[in] bTemporary

Remarks

CMFCVisualManager::DestroyInstance

static void __stdcall DestroyInstance(BOOL bAutoDestroyOnly = FALSE);

Parameters

[in] bAutoDestroyOnly

Remarks

CMFCVisualManager::DoDrawHeaderSortArrow

void DoDrawHeaderSortArrow(
    CDC* pDC,
    CRect rect,
    BOOL bIsUp,
    BOOL bDlgCtrl);

Parameters

[in] pDC
[in] rect
[in] bIsUp
[in] bDlgCtrl

Remarks

CMFCVisualManager::DrawComboBorderWinXP

virtual BOOL DrawComboBorderWinXP(CDC*,
    CRect,
    BOOL,
    BOOL,
    BOOL);

Parameters

[in] CDC*
[in] CRect
[in] BOOL

Return Value

Remarks

CMFCVisualManager::DrawComboDropButtonWinXP

virtual BOOL DrawComboDropButtonWinXP(CDC*,
    CRect,
    BOOL,
    BOOL,
    BOOL);

Parameters

[in] CDC*
[in] CRect
[in] BOOL

Return Value

Remarks

CMFCVisualManager::DrawPushButtonWinXP

virtual BOOL DrawPushButtonWinXP(CDC*,
    CRect,
    CMFCButton*,
    UINT);

Parameters

[in] CDC*
[in] CRect
[in] CMFCButton*
[in] UINT

Return Value

Remarks

CMFCVisualManager::DrawTextOnGlass

virtual BOOL DrawTextOnGlass(
    CDC* pDC,
    CString strText,
    CRect rect,
    DWORD dwFlags,
    int nGlowSize = 0,
    COLORREF clrText = (COLORREF)-1);

Parameters

[in] pDC
[in] strText
[in] rect
[in] dwFlags
[in] nGlowSize
[in] clrText

Return Value

Remarks

CMFCVisualManager::EnableToolbarButtonFill

void EnableToolbarButtonFill(BOOL bEnable = TRUE);

Parameters

[in] bEnable

Remarks

CMFCVisualManager::GetAutoHideButtonTextColor

The framework calls this method to retrieve the text color of an auto-hide button.

virtual COLORREF GetAutoHideButtonTextColor(CMFCAutoHideButton* pButton);

Parameters

pButton
[in] A pointer to an auto-hide button.

Return Value

A COLORREF parameter that specifies the text color of pButton.

Remarks

Override this method in a derived class to customize the text color of an auto-hide button in your application. To do this, return the color that you want your application to use as the text color.

CMFCVisualManager::GetButtonExtraBorder

The framework calls this method when it draws a toolbar button.

virtual CSize GetButtonExtraBorder() const;

Return Value

A CSize object that contains the extra size of the border for toolbar buttons.

Remarks

Some skins have to extend the borders of toolbar buttons. Override this method in a custom visual manager to extend the borders of toolbar buttons in your application. The default implementation of this method returns an empty size.

CMFCVisualManager::GetCaptionBarTextColor

The framework calls this method to retrieve the color of the text in the caption bar.

virtual COLORREF GetCaptionBarTextColor(CMFCCaptionBar* pBar);

Parameters

pBar
[in] A pointer to a caption bar.

Return Value

A COLORREF parameter that indicates the color of the text in pBar.

Remarks

Override this method in your derived class to customize the text color for a caption bar. In your overridden method, return the desired color.

CMFCVisualManager::GetCaptionButtonExtraBorder

virtual CSize GetCaptionButtonExtraBorder() const;

Return Value

Remarks

CMFCVisualManager::GetDockingPaneCaptionExtraHeight

virtual int GetDockingPaneCaptionExtraHeight() const;

Return Value

Remarks

CMFCVisualManager::GetDockingTabsBordersSize

The framework calls this method when it draws a pane that is docked and tabbed.

virtual int GetDockingTabsBordersSize();

Return Value

An integer that indicates the border size of a pane that is docked and tabbed.

Remarks

A docked pane becomes tabbed when the user docks multiple panes to the same location in your application.

Override this method in a custom visual manager to change the border size of docked tabbed control bars. The default implementation returns -1.

CMFCVisualManager::GetHighlightedMenuItemTextColor

virtual COLORREF GetHighlightedMenuItemTextColor(CMFCToolBarMenuButton* pButton);

Parameters

[in] pButton

Return Value

Remarks

CMFCVisualManager::GetInstance

Returns a pointer to the current CMFCVisualManager Class object for the application.

static CMFCVisualManager* GetInstance();

Return Value

A pointer to a CMFCVisualManager object.

Remarks

An application can only have one CMFCVisualManager object associated with it. This includes any object derived from the CMFCVisualManager class. This method returns a pointer to the associated CMFCVisualManager object. If the application does not have an associated CMFCVisualManager object, this method will create one and associate it with the application.

CMFCVisualManager::GetMDITabsBordersSize

The framework calls this method to determine the border size of an MDITabs window before it draws the window.

virtual int GetMDITabsBordersSize();

Return Value

The border size of the MDITabs window.

Remarks

Override this function in a derived class to customize the border size of the MDITabs window.

CMFCVisualManager::GetMenuImageMargin

virtual int GetMenuImageMargin() const;

Return Value

Remarks

CMFCVisualManager::GetMenuItemTextColor

virtual COLORREF GetMenuItemTextColor(
    CMFCToolBarMenuButton* pButton,
    BOOL bHighlighted,
    BOOL bDisabled);

Parameters

[in] pButton
[in] bHighlighted
[in] bDisabled

Return Value

Remarks

CMFCVisualManager::GetMenuShadowDepth

Retrieves the width and height of the menu shadow.

int GetMenuShadowDepth() const;

Return Value

The width and height of the menu shadow in pixels.

Remarks

The width and height of the menu shadow are equivalent. The default value is 7 pixels.

CMFCVisualManager::GetNcBtnSize

Called by the framework when it has to retrieve the size of the system buttons.

virtual CSize GetNcBtnSize(BOOL bSmall) const;

Parameters

bSmall
[in] A Boolean parameter that indicates whether GetNcBtnSize should retrieve the size of a small or large system button. If bSmall is TRUE, GetNcBtnSize returns the size of a small system button. Otherwise, it returns the size of a large system button.

Return Value

A CSize parameter that indicate the size of the system buttons.

Remarks

The system buttons are the buttons in the caption of the frame window that map to the commands Close, Minimize, Maximize, and Restore. The size of these buttons depends on the current visual manager. Override this method if you want to customize the size of the system buttons in your application.

CMFCVisualManager::GetPopupMenuBorderSize

The framework calls this method to obtain the border size of pop-up menus.

virtual int GetPopupMenuBorderSize() const;

Return Value

An integer that specifies the border size of pop-up menus.

Remarks

Override this method to customize the border size of pop-up menus in your application.

CMFCVisualManager::GetPopupMenuGap

virtual int GetPopupMenuGap() const;

Return Value

Remarks

CMFCVisualManager::GetPropertyGridGroupColor

The framework calls this method to get the background color of a property list.

virtual COLORREF GetPropertyGridGroupColor(CMFCPropertyGridCtrl* pPropList);

Parameters

pPropList
[in] A pointer to the property list that the framework is drawing.

Return Value

A COLORREF parameter that indicates the background color of pPropList.

Remarks

Override this function to customize the background color of a property list in your application.

CMFCVisualManager::GetPropertyGridGroupTextColor

The framework calls this method to retrieve the text color of a property list.

virtual COLORREF GetPropertyGridGroupTextColor(CMFCPropertyGridCtrl* pPropList);

Parameters

pPropList
[in] A pointer to the property list.

Return Value

A COLORREF parameter that indicates the text color of the property list.

Remarks

Override this function to customize the text color of a property list in your application.

CMFCVisualManager::GetRibbonHyperlinkTextColor

virtual COLORREF GetRibbonHyperlinkTextColor(CMFCRibbonLinkCtrl* pHyperLink);

Parameters

[in] pHyperLink

Return Value

Remarks

CMFCVisualManager::GetRibbonPopupBorderSize

virtual int GetRibbonPopupBorderSize(const CMFCRibbonPanelMenu*) const;

Parameters

[in] CMFCRibbonPanelMenu*

Return Value

Remarks

CMFCVisualManager::GetRibbonQuickAccessToolBarChevronOffset

virtual int GetRibbonQuickAccessToolBarChevronOffset();

Return Value

Remarks

CMFCVisualManager::GetRibbonQuickAccessToolBarRightMargin

virtual int GetRibbonQuickAccessToolBarRightMargin();

Return Value

Remarks

CMFCVisualManager::GetRibbonQuickAccessToolBarTextColor

virtual COLORREF GetRibbonQuickAccessToolBarTextColor(BOOL bDisabled = FALSE);

Parameters

[in] bDisabled

Return Value

Remarks

CMFCVisualManager::GetRibbonSliderColors

virtual void GetRibbonSliderColors(
    CMFCRibbonSlider* pSlider,
    BOOL bIsHighlighted,
    BOOL bIsPressed,
    BOOL bIsDisabled,
    COLORREF& clrLine,
    COLORREF& clrFill);

Parameters

[in] pSlider
[in] bIsHighlighted
[in] bIsPressed
[in] bIsDisabled
[in] clrLine
[in] clrFill

Remarks

CMFCVisualManager::GetRibbonStatusBarTextColor

virtual COLORREF GetRibbonStatusBarTextColor(CMFCRibbonStatusBar* pStatusBar);

Parameters

[in] pStatusBar

Return Value

Remarks

CMFCVisualManager::GetShowAllMenuItemsHeight

virtual int GetShowAllMenuItemsHeight(
    CDC* pDC,
    const CSize& sizeDefault);

Parameters

[in] pDC
[in] sizeDefault

Return Value

Remarks

CMFCVisualManager::GetSmartDockingBaseGuideColors

virtual void GetSmartDockingBaseGuideColors(
    COLORREF& clrBaseGroupBackground,
    COLORREF& clrBaseGroupBorder);

Parameters

[in] clrBaseGroupBackground
[in] clrBaseGroupBorder

Remarks

CMFCVisualManager::GetSmartDockingHighlightToneColor

virtual COLORREF GetSmartDockingHighlightToneColor();

Return Value

Remarks

CMFCVisualManager::GetSmartDockingTheme

Returns a theme used to display smart docking markers.

virtual AFX_SMARTDOCK_THEME GetSmartDockingTheme();

Return Value

Returns one of the following enumerated values: AFX_SDT_DEFAULT, AFX_SDT_VS2005, AFX_SDT_VS2008.

Remarks

CMFCVisualManager::GetStatusBarPaneTextColor

virtual COLORREF GetStatusBarPaneTextColor(
    CMFCStatusBar* pStatusBar,
    CMFCStatusBarPaneInfo* pPane);

Parameters

[in] pStatusBar
[in] pPane

Return Value

Remarks

CMFCVisualManager::GetTabFrameColors

The framework calls this function when it has to retrieve the set of colors for drawing a tab window.

virtual void GetTabFrameColors(
    const CMFCBaseTabCtrl* pTabWnd,
    COLORREF& clrDark,
    COLORREF& clrBlack,
    COLORREF& clrHighlight,
    COLORREF& clrFace,
    COLORREF& clrDarkShadow,
    COLORREF& clrLight,
    CBrush*& pbrFace,
    CBrush*& pbrBlack);

Parameters

pTabWnd
[in] A pointer to the tabbed window where the frame is drawing a tab.

clrDark
[out] A reference to a COLORREF parameter where this method stores the color for the dark border of a tab.

clrBlack
[out] A reference to a COLORREF parameter where this method stores the color for the border of the tab window. The default color for the border is black.

clrHighlight
[out] A reference to a COLORREF parameter where this method stores the color for the highlight state of the tab window.

clrFace
[out] A reference to a COLORREF parameter where this method stores the color for face of the tab window.

clrDarkShadow
[out] A reference to a COLORREF parameter where this method stores the color for the shadow of the tab window.

clrLight
[out] A reference to a COLORREF parameter where this method stores the color for the light edge of the tab window.

pbrFace
[out] A pointer to a reference for a brush. This method stores the brush that it uses to fill the face of the tab window in this parameter.

pbrBlack
[out] A pointer to a reference for a brush. This method stores the brush it uses to fill the black edge of the tab window in this parameter.

Remarks

Override this function in a derived class if you want to customize the set of colors that the framework uses when it draws a tab window.

CMFCVisualManager::GetTabHorzMargin

virtual int GetTabHorzMargin(const CMFCBaseTabCtrl*);

Parameters

[in] CMFCBaseTabCtrl*

Return Value

Remarks

CMFCVisualManager::GetTabTextColor

virtual COLORREF GetTabTextColor(
    const CMFCBaseTabCtrl*,
    int,
    BOOL);

Parameters

[in] CMFCBaseTabCtrl*
[in] int
[in] BOOL

Return Value

Remarks

CMFCVisualManager::GetTasksPaneGroupCaptionHeight

int GetTasksPaneGroupCaptionHeight() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneGroupCaptionHorzOffset

int GetTasksPaneGroupCaptionHorzOffset() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneGroupCaptionVertOffset

int GetTasksPaneGroupCaptionVertOffset() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneGroupVertOffset

int GetTasksPaneGroupVertOffset() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneHorzMargin

int GetTasksPaneHorzMargin() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneIconHorzOffset

int GetTasksPaneIconHorzOffset() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneIconVertOffset

int GetTasksPaneIconVertOffset() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneTaskHorzOffset

int GetTasksPaneTaskHorzOffset() const;

Return Value

Remarks

CMFCVisualManager::GetTasksPaneVertMargin

int GetTasksPaneVertMargin() const;

Return Value

Remarks

CMFCVisualManager::GetToolbarButtonTextColor

The framework calls this method to determine the text color of a toolbar button.

virtual COLORREF GetToolbarButtonTextColor(
    CMFCToolBarButton* pButton,
    CMFCVisualManager::AFX_BUTTON_STATE state);

Parameters

pButton
[in] A pointer to the toolbar button.

state
[in] The state of the toolbar button.

Return Value

The text color of pButton when it has the state indicated by state.

Remarks

The text color of a CMFCToolBarButton Class object depends on the state of the button. The possible states of a toolbar button are ButtonsIsRegular, ButtonsIsPressed, or ButtonsIsHighlighted.

Override this function to customize the text color of a toolbar button in your application.

CMFCVisualManager::GetToolBarCustomizeButtonMargin

virtual int GetToolBarCustomizeButtonMargin() const;

Return Value

Remarks

CMFCVisualManager::GetToolbarDisabledColor

virtual COLORREF GetToolbarDisabledColor() const;

Return Value

Remarks

CMFCVisualManager::GetToolbarDisabledTextColor

The framework calls this function to determine the text color of toolbar buttons that are unavailable.

virtual COLORREF GetToolbarDisabledTextColor();

Return Value

The color that the framework uses for the text color of toolbar buttons that are unavailable.

Remarks

Override this method in a custom visual manager to set the text color of toolbar buttons that are unavailable .

CMFCVisualManager::GetToolbarHighlightColor

virtual COLORREF GetToolbarHighlightColor();

Return Value

Remarks

CMFCVisualManager::GetToolTipInfo

virtual BOOL GetToolTipInfo(
    CMFCToolTipInfo& params,
    UINT nType = (UINT)(-1));

Parameters

[in] params
[in] nType

Return Value

Remarks

CMFCVisualManager::HasOverlappedAutoHideButtons

Returns whether auto-hide buttons overlap in the current visual manager.

virtual BOOL HasOverlappedAutoHideButtons() const;

Return Value

TRUE if auto-hide buttons overlap; FALSE if they do not.

CMFCVisualManager::IsAutoDestroy

BOOL IsAutoDestroy() const;

Return Value

Remarks

CMFCVisualManager::IsDefaultWinXPPopupButton

virtual BOOL IsDefaultWinXPPopupButton(CMFCDesktopAlertWndButton*) const;

Parameters

[in] CMFCDesktopAlertWndButton*

Return Value

Remarks

CMFCVisualManager::IsDockingTabHasBorder

Returns whether the current visual manager draws borders around panes that are docked and tabbed.

virtual BOOL IsDockingTabHasBorder();

Return Value

TRUE if the visual manager draws borders around panes that are docked and tabbed; FALSE otherwise.

Remarks

Docked panes become tabbed when multiple panes are docked to the same location.

CMFCVisualManager::IsEmbossDisabledImage

Specifies whether the framework embosses images that are unavailable.

BOOL IsEmbossDisabledImage() const;

Return Value

Nonzero if the framework embosses images that are unavailable; otherwise 0.

Remarks

This method is called by CMFCToolBarImages::Draw when it draws an image on the toolbar that is unavailable.

CMFCVisualManager::IsFadeInactiveImage

The framework calls this method when it draws inactive images on the toolbar or in a menu.

BOOL IsFadeInactiveImage() const;

Return Value

Nonzero if the framework uses the lighting effect when it draws inactive images on the toolbar or in a menu; otherwise 0.

Remarks

You can activate or deactivate the lighting effect by calling CMFCVisualManager::SetFadeInactiveImage. The lighting effect is what makes unavailable images appear faded.

CMFCVisualManager::IsFrameMenuCheckedItems

BOOL IsFrameMenuCheckedItems() const;

Return Value

Remarks

CMFCVisualManager::IsHighlightOneNoteTabs

virtual BOOL IsHighlightOneNoteTabs() const;

Return Value

Remarks

CMFCVisualManager::IsHighlightWholeMenuItem

virtual BOOL IsHighlightWholeMenuItem();

Return Value

Remarks

CMFCVisualManager::IsLayeredRibbonKeyTip

virtual BOOL IsLayeredRibbonKeyTip() const;

Return Value

Remarks

CMFCVisualManager::IsMenuFlatLook

Indicates whether menu buttons appear flat.

BOOL IsMenuFlatLook() const;

Return Value

Nonzero if menu buttons appear flat; 0 otherwise.

Remarks

By default, menu buttons do not appear flat. Use the CMFCVisualManager::SetMenuFlatLook method to change this behavior. When menu buttons appear flat, they do not change appearance when the user clicks on them.

CMFCVisualManager::IsOfficeXPStyleMenus

Indicates whether the visual manager implements Office XP-style menus.

virtual BOOL IsOfficeXPStyleMenus() const;

Return Value

Nonzero if the visual manager displays Office XP-style menus; otherwise 0.

Remarks

The CMFCPopupMenu Class calls this method when it has to draw the menu and shadow. By default, this method returns FALSE. If you want to use pop-up menus similar to the pop-up menus in Office XP, override this method in a custom visual manager and return TRUE.

CMFCVisualManager::IsOffsetPressedButton

virtual BOOL IsOffsetPressedButton() const;

Return Value

Remarks

CMFCVisualManager::IsOwnerDrawCaption

Indicates whether the current visual manager implements owner-drawn captions.

virtual BOOL IsOwnerDrawCaption();

Return Value

TRUE if all the frame windows in the application have owner-draw captions; FALSE otherwise.

CMFCVisualManager::IsOwnerDrawMenuCheck

virtual BOOL IsOwnerDrawMenuCheck();

Return Value

Remarks

CMFCVisualManager::IsShadowHighlightedImage

Indicates whether the visual manager displays shadows when rendering highlighted images.

BOOL IsShadowHighlightedImage() const;

Return Value

Nonzero when the visual manager displays shadows under highlighted images; 0 otherwise.

CMFCVisualManager::IsToolbarButtonFillEnabled

BOOL IsToolbarButtonFillEnabled() const;

Return Value

Remarks

CMFCVisualManager::IsToolbarRoundShape

virtual BOOL IsToolbarRoundShape(CMFCToolBar*);

Parameters

[in] CMFCToolBar*

Return Value

Remarks

CMFCVisualManager::IsWindowsThemingSupported

virtual BOOL IsWindowsThemingSupported() const;

Return Value

Remarks

CMFCVisualManager::OnActivateApp

virtual void OnActivateApp(
    CWnd* pWnd,
    BOOL bActive);

Parameters

[in] pWnd
[in] bActive

Remarks

CMFCVisualManager::OnDrawAutoHideButtonBorder

The framework calls this method when it draws the border of an auto-hide button.

virtual void OnDrawAutoHideButtonBorder(
    CDC* pDC,
    CRect rectBounds,
    CRect rectBorderSize,
    CMFCAutoHideButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

rectBounds
[in] The size and location of the auto-hide button.

rectBorderSize
[in] A CRect parameter that contains the sizes of the borders.

pButton
[in] A pointer to the auto-hide button. The framework is drawing the border for this button.

Remarks

Override this method in a derived class if you want to customize the appearance of the border of an auto-hide button. By default, this method fills a flat border with the default shadow color for your application.

The rectBorderSize parameter does not contain the coordinates of the border. It contains the size of the border in the top, bottom, left, and right data members. A value less than or equal to 0 indicates no border on that side of the auto-hide button.

CMFCVisualManager::OnDrawBarGripper

Called by the framework when it draws the gripper for a control bar.

virtual void OnDrawBarGripper(
    CDC* pDC,
    CRect rectGripper,
    BOOL bHorz,
    CBasePane* pBar);

Parameters

pDC
[in] A pointer to the device context for a control bar.

rectGripper
[in] The bounding rectangle for the control bar.

bHorz
[in] A Boolean parameter that specifies whether the control bar is docked horizontally or vertically.

pBar
[in] A pointer to a control bar. The visual manager draws the gripper of this control bar.

Remarks

The default implementation of this method displays the standard gripper. To customize the appearance of the gripper, override this method in a custom class derived from the CMFCVisualManager class.

CMFCVisualManager::OnDrawBrowseButton

The framework calls this method when it draws the browse button for an edit control.

virtual BOOL OnDrawBrowseButton(
    CDC* pDC,
    CRect rect,
    CMFCEditBrowseCtrl* pEdit,
    CMFCVisualManager::AFX_BUTTON_STATE state,
    COLORREF& clrText);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundary for the browse button.

pEdit
[in] A pointer to an edit control. The visual manager draws the browse button for this edit control.

state
[in] An enumerated value that specifies the state of the button.

clrText
[out] A reference to a COLORREF parameter. This is a reserved value and is currently unused.

Return Value

TRUE if successful; otherwise FALSE.

Remarks

Override this function in a derived class if you want to customize the appearance of browse buttons in instances of the CMFCEditBrowseCtrl Class. The possible values for the state of the button are ButtonsIsRegular, ButtonsIsPressed, and ButtonsIsHighlighted.

CMFCVisualManager::OnDrawButtonBorder

The framework calls this method when it draws the border of a toolbar button.

virtual void OnDrawButtonBorder(
    CDC* pDC,
    CMFCToolBarButton* pButton,
    CRect rect,
    CMFCVisualManager::AFX_BUTTON_STATE state);

Parameters

pDC
[in] A pointer to the device context of a toolbar button.

pButton
[in] A pointer to a toolbar button. The framework draws the border of this button.

rect
[in] A rectangle that specifies the boundaries of the toolbar button.

state
[in] An enumerated data type that specifies the current state of the toolbar button.

Remarks

The default implementation of this method displays the standard border. Override this method in a derived visual manager to customize the appearance of the border of a toolbar button.

The possible states of a toolbar button are ButtonsIsRegular, ButtonsIsPressed, or ButtonsIsHighlighted.

CMFCVisualManager::OnDrawButtonSeparator

virtual void OnDrawButtonSeparator(
    CDC* pDC,
    CMFCToolBarButton* pButton,
    CRect rect,
    CMFCVisualManager::AFX_BUTTON_STATE state,
    BOOL bHorz);

Parameters

[in] pDC
[in] pButton
[in] rect
[in] state
[in] bHorz

Remarks

CMFCVisualManager::OnDrawCaptionBarBorder

The framework calls this method when it draws the border of a CMFCCaptionBar Class object.

virtual void OnDrawCaptionBarBorder(
    CDC* pDC,
    CMFCCaptionBar* pBar,
    CRect rect,
    COLORREF clrBarBorder,
    BOOL bFlatBorder);

Parameters

pDC
[in] A pointer to a device context.

pBar
[in] A pointer to a CMFCCaptionBar object. The framework draws this caption bar.

rect
[in] A rectangle that specifies the boundaries of the caption bar.

clrBarBorder
[in] The color of the border.

bFlatBorder
[in] A Boolean parameter that specifies whether the border has a flat, 2D appearance.

Remarks

Override this method in a derived class to customize the appearance of the border of a caption bar.

CMFCVisualManager::OnDrawCaptionBarButtonBorder

virtual void OnDrawCaptionBarButtonBorder(
    CDC* pDC,
    CMFCCaptionBar* pBar,
    CRect rect,
    BOOL bIsPressed,
    BOOL bIsHighlighted,
    BOOL bIsDisabled,
    BOOL bHasDropDownArrow,
    BOOL bIsSysButton);

Parameters

[in] pDC
[in] pBar
[in] rect
[in] bIsPressed
[in] bIsHighlighted
[in] bIsDisabled
[in] bHasDropDownArrow
[in] bIsSysButton

Remarks

CMFCVisualManager::OnDrawCaptionBarInfoArea

virtual void OnDrawCaptionBarInfoArea(
    CDC* pDC,
    CMFCCaptionBar* pBar,
    CRect rect);

Parameters

[in] pDC
[in] pBar
[in] rect

Remarks

CMFCVisualManager::OnDrawCaptionButton

The framework calls this method when it draws a CMFCCaptionButton object.

virtual void OnDrawCaptionButton (
    CDC* pDC,
    CMFCCaptionButton* pButton,
    BOOL bActive,
    BOOL bHorz,
    BOOL bMaximized,
    BOOL bDisabled,
    int nImageID = -1);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to a CMFCCaptionButton object. The framework draws this caption button.

bActive
[in] A Boolean parameter that specifies whether the button is active.

bHorz
[in] A Boolean parameter that specifies whether the caption is horizontal.

bMaximized
[in] A Boolean parameter that specifies whether the parent pane is maximized.

bDisabled
[in] A Boolean parameter that specifies whether the caption button is disabled.

nImageID
[in] The image index for the icon to use for the button. If nImageID is -1, this method uses the image index recorded in pButton.

Remarks

The default implementation of this method displays a small button from the global instance of the CMenuImages class. The buttons are listed in the header file for CMenuImages. Some examples include CMenuImages::IdClose, CMenuImages::IdArowLeft, CMenuImages::IdArowRight, CMenuImages::IdArowDown, CMenuImages::IdArowUp, and CMenuImages::IdPinHorz.

Override this method in a derived class to customize the appearance of caption buttons.

CMFCVisualManager::OnDrawCheckBox

virtual void OnDrawCheckBox(
    CDC* pDC,
    CRect rect,
    BOOL bHighlighted,
    BOOL bChecked,
    BOOL bEnabled);

Parameters

[in] pDC
[in] rect
[in] bHighlighted
[in] bChecked
[in] bEnabled

Remarks

CMFCVisualManager::OnDrawCheckBoxEx

virtual void OnDrawCheckBoxEx(
    CDC* pDC,
    CRect rect,
    int nState,
    BOOL bHighlighted,
    BOOL bPressed,
    BOOL bEnabled);

Parameters

[in] pDC
[in] rect
[in] nState
[in] bHighlighted
[in] bPressed
[in] bEnabled

Remarks

CMFCVisualManager::OnDrawComboBorder

The framework calls this method when it draws the border around an instance of the CMFCToolBarComboBoxButton Class.

virtual void OnDrawComboBorder(
    CDC* pDC,
    CRect rect,
    BOOL bDisabled,
    BOOL bIsDropped,
    BOOL bIsHighlighted,
    CMFCToolBarComboBoxButton* pButton);

Parameters

pDC
[in] A pointer to the device context of a combo box button.

rect
[in] A rectangle that specifies the boundaries of the combo box button.

bDisabled
[in] A Boolean parameter that indicates whether the combo box button is unavailable.

bIsDropped
[in] A Boolean parameter that indicates whether the combo box is dropped down.

bIsHighlighted
[in] A Boolean parameter that indicates whether the combo box button is highlighted.

pButton
[in] A pointer to a CMFCToolBarComboBoxButton object. The framework draws this combo box button.

Remarks

Override this method in your derived visual manager to customize the appearance of the border of the combo box.

CMFCVisualManager::OnDrawComboDropButton

The framework calls this method when it draws the drop button of a CMFCToolBarComboBoxButton.

virtual void OnDrawComboDropButton(
    CDC* pDC,
    CRect rect,
    BOOL bDisabled,
    BOOL bIsDropped,
    BOOL bIsHighlighted,
    CMFCToolBarComboBoxButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the drop button.

bDisabled
[in] A Boolean parameter that indicates whether the drop button is unavailable.

bIsDropped
[in] A Boolean parameter that indicates whether the combo box is dropped down.

bIsHighlighted
[in] A Boolean parameter that indicates whether the drop button is highlighted.

pButton
[in] A pointer to a CMFCToolBarComboBoxButton object. The framework draws the drop button for this combo box button.

Remarks

Override this method in your derived visual manager to customize the appearance of the drop button of a combo box button.

CMFCVisualManager::OnDrawControlBorder

virtual void OnDrawControlBorder(CWnd* pWndCtrl);

Parameters

[in] pWndCtrl

Remarks

CMFCVisualManager::OnDrawDefaultRibbonImage

The framework calls this method when it draws the default image that is used for the ribbon button.

virtual void OnDrawDefaultRibbonImage(
    CDC* pDC,
    CRect rectImage,
    BOOL bIsDisabled = FALSE,
    BOOL bIsPressed = FALSE,
    BOOL bIsHighlighted = FALSE);

Parameters

pDC
[in] A pointer to a device context.

rectImage
[in] A rectangle that specifies the boundaries of the default image.

bIsDisabled
[in] A Boolean parameter that indicates whether the ribbon button is unavailable.

bIsPressed
[in] A Boolean parameter that indicates whether the ribbon button is pressed.

bIsHighlighted
[in] A Boolean parameter that indicates whether the ribbon button is highlighted.

Remarks

Override this method in a derived visual manager if you want to customize the image that is used for the ribbon button.

CMFCVisualManager::OnDrawEditBorder

The framework calls this method when it draws the border around an instance of the CMFCToolBarEditBoxButton Class.

virtual void OnDrawEditBorder(
    CDC* pDC,
    CRect rect,
    BOOL bDisabled,
    BOOL bIsHighlighted,
    CMFCToolBarEditBoxButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the CMFCToolBarEditBoxButton object.

bDisabled
[in] A Boolean parameter that indicates whether the button is unavailable.

bIsHighlighted
[in] A Boolean parameter that indicates whether the button is highlighted.

pButton
[in] A pointer to a CMFCToolBarEditBoxButton object. The framework draws the border of this edit box button.

Remarks

Override this method in a derived visual manager to customize the border of a CMFCToolBarEditBoxButton object.

CMFCVisualManager::OnDrawExpandingBox

virtual void OnDrawExpandingBox(
    CDC* pDC,
    CRect rect,
    BOOL bIsOpened,
    COLORREF colorBox);

Parameters

[in] pDC
[in] rect
[in] bIsOpened
[in] colorBox

Remarks

CMFCVisualManager::OnDrawFloatingToolbarBorder

The framework calls this method when it draws the border of a floating toolbar.

virtual void OnDrawFloatingToolbarBorder(
    CDC* pDC,
    CMFCBaseToolBar* pToolBar,
    CRect rectBorder,
    CRect rectBorderSize);

Parameters

pDC
[in] A pointer to a device context.

pToolBar
[in] A pointer to the floating toolbar.

rectBorder
[in] A rectangle that specifies the boundaries of the floating toolbar.

rectBorderSize
[in] A rectangle that specifies the border size of the toolbar.

Remarks

A floating toolbar is a toolbar that appears as a mini-frame window. Usually, this occurs when a user drags a toolbar so that it is no longer docked.

The size of the border is specified by the corresponding parameter in rectBorderSize. For example, the width of the top border of the toolbar is specified by rectBorderSize.top.

Override this method in a derived visual manager to customize the appearance of the border of a floating toolbar.

CMFCVisualManager::OnDrawHeaderCtrlBorder

The framework calls this method when it draws the border around an instance of the CMFCHeaderCtrl Class.

virtual void OnDrawHeaderCtrlBorder(
    CMFCHeaderCtrl* pCtrl,
    CDC* pDC,
    CRect& rect,
    BOOL bIsPressed,
    BOOL bIsHighlighted);

Parameters

pCtrl
[in] A pointer to a CMFCHeaderCtrl object. The framework draws the border of this header control.

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the header control.

bIsPressed
[in] A Boolean parameter that indicates whether the header control is pressed.

bIsHighlighted
[in] A Boolean parameter that indicates whether the header control is highlighted.

Remarks

Override this method in a derived visual manager to customize the border of the header control.

CMFCVisualManager::OnDrawHeaderCtrlSortArrow

The framework calls this function when it draws the sort arrow of a header control.

virtual void OnDrawHeaderCtrlSortArrow(
    CMFCHeaderCtrl* pCtrl,
    CDC* pDC,
    CRect& rect,
    BOOL bIsUp);

Parameters

pCtrl
[in] A pointer to a header control. The visual manager draws the sort arrow of this CMFCHeaderCtrl Class object.

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the sort arrow.

bIsUp
[in] A Boolean that specifies the direction of the sort arrow.

Remarks

If bIsUp is TRUE, the visual manager draws an up sort arrow. If it is FALSE, the visual manager draws a down sort arrow. Override OnDrawHeaderCtrlSortArrow in a derived class to customize the appearance of the sort button.

CMFCVisualManager::OnDrawMenuArrowOnCustomizeList

virtual void OnDrawMenuArrowOnCustomizeList(
    CDC* pDC,
    CRect rectCommand,
    BOOL bSelected);

Parameters

[in] pDC
[in] rectCommand
[in] bSelected

Remarks

CMFCVisualManager::OnDrawMenuBorder

The framework calls this method when it draws the border of a CMFCPopupMenu.

virtual void OnDrawMenuBorder(
    CDC* pDC,
    CMFCPopupMenu* pMenu,
    CRect rect);

Parameters

pDC
[in] A pointer to the device context for a CMFCPopupMenu object.

pMenu
[in] A pointer to a CMFCPopupMenu object. The framework draws a border around this popup menu.

rect
[in] A rectangle that specifies the boundaries of the popup menu.

Remarks

The default implementation of this method displays the standard menu border. Override this method in a derived visual manager to customize the appearance of the menu border.

CMFCVisualManager::OnDrawMenuCheck

virtual void OnDrawMenuCheck(
    CDC* pDC,
    CMFCToolBarMenuButton* pButton,
    CRect rect,
    BOOL bHighlight,
    BOOL bIsRadio);

Parameters

[in] pDC
[in] pButton
[in] rect
[in] bHighlight
[in] bIsRadio

Remarks

CMFCVisualManager::OnDrawMenuItemButton

virtual void OnDrawMenuItemButton(
    CDC* pDC,
    CMFCToolBarMenuButton* pButton,
    CRect rectButton,
    BOOL bHighlight,
    BOOL bDisabled);

Parameters

[in] pDC
[in] pButton
[in] rectButton
[in] bHighlight
[in] bDisabled

Remarks

CMFCVisualManager::OnDrawMenuLabel

virtual COLORREF OnDrawMenuLabel(
    CDC* pDC,
    CRect rect);

Parameters

[in] pDC
[in] rect

Return Value

Remarks

CMFCVisualManager::OnDrawMenuResizeBar

virtual void OnDrawMenuResizeBar(
    CDC* pDC,
    CRect rect,
    int nResizeFlags);

Parameters

[in] pDC
[in] rect
[in] nResizeFlags

Remarks

CMFCVisualManager::OnDrawMenuScrollButton

The framework calls this method when it draws a menu scroll button.

virtual void OnDrawMenuScrollButton(
    CDC* pDC,
    CRect rect,
    BOOL bIsScrollDown,
    BOOL bIsHighlited,
    BOOL bIsPressed,
    BOOL bIsDisabled);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the scroll button.

bIsScrollDown
[in] A Boolean that indicates which type of button the visual manager draws. A value of TRUE indicates the visual manager draws a down button.

bIsHighlited
[in] A Boolean that indicates whether the button is highlighted.

bIsPressed
[in] A Boolean that indicates whether the button is pressed.

bIsDisabled
[in] A Boolean that indicates whether the button is disabled.

Remarks

Override this method in a derived visual manager to customize the appearance of menu scroll buttons. Menu scroll buttons appear on the edge of pop-up menus when the total height of the menu items exceeds the height of the pop-up menu.

CMFCVisualManager::OnDrawMenuShadow

virtual void OnDrawMenuShadow(
    CDC* pDC,
    const CRect& rectClient,
    const CRect& rectExclude,
    int nDepth,
    int iMinBrightness,
    int iMaxBrightness,
    CBitmap* pBmpSaveBottom,
    CBitmap* pBmpSaveRight,
    BOOL bRTL);

Parameters

[in] pDC
[in] rectClient
[in] rectExclude
[in] nDepth
[in] iMinBrightness
[in] iMaxBrightness
[in] pBmpSaveBottom
[in] pBmpSaveRight
[in] bRTL

Remarks

CMFCVisualManager::OnDrawMenuSystemButton

The framework calls this method when it draws a menu system button for the application.

virtual void OnDrawMenuSystemButton(
    CDC* pDC,
    CRect rect,
    UINT uiSystemCommand,
    UINT nStyle,
    BOOL bHighlight);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the button.

uiSystemCommand
[in] A flag that specifies which system command is associated with the button. Possible values are SC_CLOSE, SC_MINIMIZE, and SC_RESTORE.

nStyle
[in] A flag that specifies the current style of the button. Possible values are TBBS_PRESSED, TBBS_DISABLED, and 0.

bHighlight
[in] A Boolean parameter that specifies whether the button is highlighted.

Remarks

The menu system buttons are the Close, Minimize, Maximize, and Restore buttons located on the title bar.

The default implementation for this method calls CDC::DrawFrameControl with the DFC_CAPTION type. Override this method in your derived visual manager class to customize the appearance of system buttons.

CMFCVisualManager::OnDrawMiniFrameBorder

virtual void OnDrawMiniFrameBorder(
    CDC* pDC,
    CPaneFrameWnd* pFrameWnd,
    CRect rectBorder,
    CRect rectBorderSize);

Parameters

[in] pDC
[in] pFrameWnd
[in] rectBorder
[in] rectBorderSize

Remarks

CMFCVisualManager::OnDrawOutlookBarSplitter

The framework calls this method when it draws the splitter for an Outlook bar.

virtual void OnDrawOutlookBarSplitter(
    CDC* pDC,
    CRect rectSplitter);

Parameters

pDC
[in] A pointer to a device context.

rectSplitter
[in] A rectangle that specifies the boundaries of the splitter.

Remarks

Override this method in a derived visual manager to customize the appearance of splitters on an Outlook bar.

CMFCVisualManager::OnDrawOutlookPageButtonBorder

Called by the framework when it draws the border of an Outlook page button.

virtual void OnDrawOutlookPageButtonBorder(
    CDC* pDC,
    CRect& rectBtn,
    BOOL bIsHighlighted,
    BOOL bIsPressed);

Parameters

pDC
[in] A pointer to a device context.

rectBtn
[in] A rectangle that specifies the boundary of the Outlook page button.

bIsHighlighted
[in] A Boolean that specifies whether the button is highlighted.

bIsPressed
[in] A Boolean that specifies whether the button is pressed.

Remarks

Override this method in a custom visual manager to change the appearance of the Outlook page button.

CMFCVisualManager::OnDrawPaneBorder

The framework calls this method when it draws the border of a CPane Class object.

virtual void OnDrawPaneBorder(
    CDC* pDC,
    CBasePane* pBar,
    CRect& rect);

Parameters

pDC
[in] A pointer to the device context of a control bar.

pBar
[in] A pointer to a pane. The visual manager draws the border of this pane.

rect
[in] A rectangle that indicates the boundaries of the pane.

Remarks

The default implementation of this method displays the standard border. Override this method in a derived class to customize the appearance of the border.

CMFCVisualManager::OnDrawPaneCaption

The framework calls this method when it draws a caption for an instance of the CDockablePane Class.

virtual COLORREF OnDrawPaneCaption(
    CDC* pDC,
    CDockablePane* pBar,
    BOOL bActive,
    CRect rectCaption,
    CRect rectButtons);

Parameters

pDC
[in] A pointer to a device context.

pBar
[in] A pointer to a CDockablePane object. The framework draws the caption for this pane.

bActive
[in] A Boolean parameter that indicates whether the control bar is active.

rectCaption
[in] A rectangle that specifies the boundaries of the caption.

rectButtons
[in] A rectangle that specifies the boundaries of the caption buttons.

Return Value

A COLORREF parameter that indicates the text color of the caption.

Remarks

Override this method in a derived visual manager to customize the appearance of pane captions.

CMFCVisualManager::OnDrawPaneDivider

virtual void OnDrawPaneDivider(
    CDC* pDC,
    CPaneDivider* pSlider,
    CRect rect,
    BOOL bAutoHideMode);

Parameters

[in] pDC
[in] pSlider
[in] rect
[in] bAutoHideMode

Remarks

CMFCVisualManager::OnDrawPopupWindowBorder

virtual void OnDrawPopupWindowBorder(
    CDC* pDC,
    CRect rect);

Parameters

[in] pDC
[in] rect

Remarks

CMFCVisualManager::OnDrawPopupWindowButtonBorder

virtual void OnDrawPopupWindowButtonBorder(
    CDC* pDC,
    CRect rectClient,
    CMFCDesktopAlertWndButton* pButton);

Parameters

[in] pDC
[in] rectClient
[in] pButton

Remarks

CMFCVisualManager::OnDrawPopupWindowCaption

virtual COLORREF OnDrawPopupWindowCaption(
    CDC* pDC,
    CRect rectCaption,
    CMFCDesktopAlertWnd* pPopupWnd);

Parameters

[in] pDC
[in] rectCaption
[in] pPopupWnd

Return Value

Remarks

CMFCVisualManager::OnDrawRibbonApplicationButton

The framework calls this method when it draws the Main Button on the ribbon.

virtual void OnDrawRibbonApplicationButton(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to the Main Button on the ribbon.

Remarks

Override this method in a derived visual manager if you want to customize the appearance of the Main Button.

CMFCVisualManager::OnDrawRibbonButtonBorder

The framework calls this method when it draws the border of a button on the ribbon.

virtual void OnDrawRibbonButtonBorder(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to a CMFCRibbonButton object. The framework draws the border for this ribbon button.

Remarks

Override this method in a derived visual manager to customize the appearance of a CMFCRibbonButton.

CMFCVisualManager::OnDrawRibbonButtonsGroup

The framework calls this method when it draws a group of buttons on the ribbon.

virtual COLORREF OnDrawRibbonButtonsGroup(
    CDC* pDC,
    CMFCRibbonButtonsGroup* pGroup,
    CRect rectGroup);

Parameters

pDC
[in] A pointer to a device context.

pGroup
[in] A pointer to a group of buttons on the ribbon. The framework draws this group of buttons.

rectGroup
[in] A rectangle that specifies the boundaries of the group.

Return Value

A reserved value. The default implementation returns -1.

Remarks

Override this method in a derived visual manager to customize the appearance of a group of buttons on the ribbon.

CMFCVisualManager::OnDrawRibbonCaption

The framework calls this method when it draws the caption bar of the main frame window. The framework calls this method only if the ribbon is integrated with the main frame.

virtual void OnDrawRibbonCaption(
    CDC* pDC,
    CMFCRibbonBar* pBar,
    CRect rect,
    CRect rectText);

Parameters

pDC
[in] A pointer to a device context.

pBar
[in] A pointer to a ribbon bar. The visual manager draws this ribbon bar.

rect
[in] A rectangle that specifies the boundaries of the ribbon bar.

rectText
[in] A rectangle that specifies the boundaries for the text of the caption bar.

Remarks

Override this function in a derived visual manager to customize the appearance of the caption bar. This method affects the caption bar only if the ribbon is integrated with the main frame window.

CMFCVisualManager::OnDrawRibbonCaptionButton

The framework calls this method when it draws a caption button located on the ribbon bar.

virtual void OnDrawRibbonCaptionButton(
    CDC* pDC,
    CMFCRibbonCaptionButton* pButton);

Parameters

pDC
A pointer to a device context.

pButton
A pointer to a CMFCRibbonCaptionButton class. The framework draws this caption button.

Remarks

Override this method in a derived visual manager to customize the appearance of a caption button on the ribbon.

CMFCVisualManager::OnDrawRibbonCategory

The framework calls this method when it draws a CMFCRibbonCategory object.

virtual void OnDrawRibbonCategory(
    CDC* pDC,
    CMFCRibbonCategory* pCategory,
    CRect rectCategory);

Parameters

pDC
[in] A pointer to a device context.

pCategory
[in] A pointer to a CMFCRibbonCategory object. The framework draws this ribbon category.

rectCategory
[in] A rectangle that specifies the boundary of all the category panels on the ribbon.

Remarks

A ribbon category is a logical grouping of menu commands. For more information about ribbon categories, see CMFCRibbonCategory Class.

Override this method in a derived visual manager to customize the appearance of a ribbon category.

CMFCVisualManager::OnDrawRibbonCategoryCaption

The framework calls this method when it draws the caption bar for a ribbon category.

virtual COLORREF OnDrawRibbonCategoryCaption(
    CDC* pDC,
    CMFCRibbonContextCaption* pContextCaption);

Parameters

pDC
[in] The drawing context.

pContextCaption
[in] A pointer to a caption bar. The visual manager draws this CMFCRibbonContextCaption Class object.

Return Value

A COLORREF parameter that indicates the color of the text on the caption bar.

Remarks

Override this method in a derived class to customize the appearance of the caption bar for a ribbon category. For more information about the caption bar, see CMFCRibbonContextCaption Class.

CMFCVisualManager::OnDrawRibbonCategoryScroll

virtual void OnDrawRibbonCategoryScroll(
    CDC* pDC,
    CRibbonCategoryScroll* pScroll);

Parameters

[in] pDC
[in] pScroll

Remarks

CMFCVisualManager::OnDrawRibbonCategoryTab

The framework calls this method when it draws the tab for a ribbon category.

virtual COLORREF OnDrawRibbonCategoryTab(
    CDC* pDC,
    CMFCRibbonTab* pTab,
    BOOL bIsActive);

Parameters

pDC
[in] A pointer to a device context.

pTab
[in] A pointer to an instance of the CMFCRibbonTab class. The framework draws this tab.

bIsActive
[in] A Boolean parameter that indicates whether the tab is active.

Return Value

The color that is used for text on the ribbon category tab.

Remarks

Override this method in a derived visual manager to customize the appearance of a ribbon category tab. For more information about ribbon categories, see CMFCRibbonCategory Class.

CMFCVisualManager::OnDrawRibbonCheckBoxOnList

virtual void OnDrawRibbonCheckBoxOnList(
    CDC* pDC,
    CMFCRibbonCheckBox* pCheckBox,
    CRect rect,
    BOOL bIsSelected,
    BOOL bHighlighted);

Parameters

[in] pDC
[in] pCheckBox
[in] rect
[in] bIsSelected
[in] bHighlighted

Remarks

CMFCVisualManager::OnDrawRibbonColorPaletteBox

virtual void OnDrawRibbonColorPaletteBox(
    CDC* pDC,
    CMFCRibbonColorButton* pColorButton,
    CMFCRibbonGalleryIcon* pIcon,
    COLORREF color,
    CRect rect,
    BOOL bDrawTopEdge,
    BOOL bDrawBottomEdge,
    BOOL bIsHighlighted,
    BOOL bIsChecked,
    BOOL bIsDisabled);

Parameters

[in] pDC
[in] pColorButton
[in] pIcon
[in] color
[in] rect
[in] bDrawTopEdge
[in] bDrawBottomEdge
[in] bIsHighlighted
[in] bIsChecked
[in] bIsDisabled

Remarks

CMFCVisualManager::OnDrawRibbonDefaultPaneButton

The framework calls this method when it draws the default button for the ribbon pane.

virtual void OnDrawRibbonDefaultPaneButton(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to the default button for the ribbon pane.

Remarks

The framework displays the default button when a ribbon pane is resized to its minimal size and there is no area to display the content for the panel. When the user clicks on the default button, the framework displays a drop down menu that contains the content for the panel.

Override this method in a derived visual manager to customize the appearance of the default button.

CMFCVisualManager::OnDrawRibbonDefaultPaneButtonContext

virtual void OnDrawRibbonDefaultPaneButtonContext(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

[in] pDC
[in] pButton

Remarks

CMFCVisualManager::OnDrawRibbonDefaultPaneButtonIndicator

virtual void OnDrawRibbonDefaultPaneButtonIndicator(
    CDC* pDC,
    CMFCRibbonButton* pButton,
    CRect rect,
    BOOL bIsSelected,
    BOOL bHighlighted);

Parameters

[in] pDC
[in] pButton
[in] rect
[in] bIsSelected
[in] bHighlighted

Remarks

CMFCVisualManager::OnDrawRibbonGalleryBorder

virtual void OnDrawRibbonGalleryBorder(
    CDC* pDC,
    CMFCRibbonGallery* pButton,
    CRect rectBorder);

Parameters

[in] pDC
[in] pButton
[in] rectBorder

Remarks

CMFCVisualManager::OnDrawRibbonGalleryButton

virtual void OnDrawRibbonGalleryButton(
    CDC* pDC,
    CMFCRibbonGalleryIcon* pButton);

Parameters

[in] pDC
[in] pButton

Remarks

CMFCVisualManager::OnDrawRibbonKeyTip

virtual void OnDrawRibbonKeyTip(
    CDC* pDC,
    CMFCRibbonBaseElement* pElement,
    CRect rect,
    CString str);

Parameters

[in] pDC
[in] pElement
[in] rect
[in] str

Remarks

CMFCVisualManager::OnDrawRibbonLabel

The framework calls this method when it draws the label of the ribbon.

virtual void OnDrawRibbonLabel(
    CDC* pDC,
    CMFCRibbonLabel* pLabel,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pLabel
[in] A pointer to a CMFCRibbonLabel object. The framework draws this ribbon label.

rect
[in] A rectangle that specifies the boundaries of the ribbon panel.

Remarks

Override this method in a derived class to customize the ribbon label.

CMFCVisualManager::OnDrawRibbonMainPanelButtonBorder

The framework calls this method when it draws the border of a CMFCRibbonButton that is positioned on the Main panel.

virtual void OnDrawRibbonMainPanelButtonBorder(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to a CMFCRibbonButton located on the main panel of the ribbon. The framework draws the border for this button.

Remarks

Override this method in a derived visual manager to customize the appearance of the border for a CMFCRibbonButton on the Main panel.

CMFCVisualManager::OnDrawRibbonMainPanelFrame

The framework calls this method when it draws the frame around the CMFCRibbonMainPanel.

virtual void OnDrawRibbonMainPanelFrame(
    CDC* pDC,
    CMFCRibbonMainPanel* pPanel,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pPanel
[in] A pointer to the CMFCRibbonMainPanel.

rect
[in] A rectangle that specifies the boundaries of the CMFCRibbonMainPanel.

Remarks

Override this method in a derived visual manager to customize the appearance of the frame for the CMFCRibbonMainPanel.

CMFCVisualManager::OnDrawRibbonMenuCheckFrame

virtual void OnDrawRibbonMenuCheckFrame(
    CDC* pDC,
    CMFCRibbonButton* pButton,
    CRect rect);

Parameters

[in] pDC
[in] pButton
[in] rect

Remarks

CMFCVisualManager::OnDrawRibbonPanel

The framework calls this method when it draws a CMFCRibbonPanel object.

virtual COLORREF OnDrawRibbonPanel(
    CDC* pDC,
    CMFCRibbonPanel* pPanel,
    CRect rectPanel,
    CRect rectCaption);

Parameters

pDC
[in] A pointer to a device context.

pPanel
[in] A pointer to a CMFCRibbonPanel object. The framework draws this ribbon panel.

rectPanel
[in] A rectangle that specifies the boundaries of the panel.

rectCaption
[in] A rectangle that specifies the boundaries of the caption for the panel.

Return Value

The color of text on the ribbon panel.

Remarks

Override this method in a derived class to customize the appearance of a ribbon panel.

CMFCVisualManager::OnDrawRibbonPanelCaption

The framework calls this method when it draws the caption of a CMFCRibbonPanel Class.

virtual void OnDrawRibbonPanelCaption(
    CDC* pDC,
    CMFCRibbonPanel* pPanel,
    CRect rectCaption);

Parameters

pDC
[in] A pointer to a device context.

pPanel
[in] A pointer to a CMFCRibbonPanel object. The framework draws the caption for this ribbon panel.

rectCaption
[in] A rectangle that specifies the boundaries of the caption for the ribbon panel.

Remarks

Override this method in a derived class to customize the appearance of captions for ribbon panels.

CMFCVisualManager::OnDrawRibbonProgressBar

The framework calls this method when it draws a CMFCRibbonProgressBar Class.

virtual void OnDrawRibbonProgressBar(
    CDC* pDC,
    CMFCRibbonProgressBar* pProgress,
    CRect rectProgress,
    CRect rectChunk,
    BOOL bInfiniteMode);

Parameters

pDC
[in] A pointer to a device context.

pProgress
[in] A pointer to a CMFCRibbonProgressBar object. The framework draws this progress bar.

rectProgress
[in] A rectangle that specifies the boundaries of the progress bar.

rectChunk
[in] A rectangle that specifies the boundaries of the area surrounding the progress bar.

bInfiniteMode
[in] A Boolean parameter that indicates the mode of the progress bar. A value of TRUE means the bar is in infinite mode. The default implementation does not use this parameter.

Remarks

Override this method in a derived class to customize the appearance of a progress bar.

CMFCVisualManager::OnDrawRibbonQuickAccessToolBarSeparator

The framework calls this method when it draws a separator on the Quick Access Toolbar of a ribbon.

virtual void OnDrawRibbonQuickAccessToolBarSeparator(
    CDC* pDC,
    CMFCRibbonSeparator* pSeparator,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pSeparator
[in] A pointer to a CMFCRibbonSeparator object. The framework draws this ribbon separator.

rect
[in] A rectangle that specifies the boundaries of the separator.

Remarks

Override this method in a derived class to customize the appearance of ribbon separators on the Quick Access Toolbar.

CMFCVisualManager::OnDrawRibbonRecentFilesFrame

The framework calls this method when it draws a frame around a list of recent files.

virtual void OnDrawRibbonRecentFilesFrame(
    CDC* pDC,
    CMFCRibbonMainPanel* pPanel,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pPanel
[in] A pointer to the Main panel on the ribbon.

rect
[in] A rectangle that specifies the boundaries of the frame for the list of recent files.

Remarks

Override this method in a derived visual manager to customize the appearance of the list of recent files.

CMFCVisualManager::OnDrawRibbonSliderChannel

The framework calls this method when it draws the channel of a CMFCRibbonSlider Class.

virtual void OnDrawRibbonSliderChannel(
    CDC* pDC,
    CMFCRibbonSlider* pSlider,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pSlider
[in] A pointer to a CMFCRibbonSlider object. The framework draws the channel for this ribbon slider.

rect
[in] A rectangle that specifies the boundaries for the channel of the ribbon slider.

Remarks

Override this method in a derived class to customize the appearance of the channel of the ribbon slider.

CMFCVisualManager::OnDrawRibbonSliderThumb

The framework calls this method when it draws the thumb of a CMFCRibbonSlider object.

virtual void OnDrawRibbonSliderThumb(
    CDC* pDC,
    CMFCRibbonSlider* pSlider,
    CRect rect,
    BOOL bIsHighlighted,
    BOOL bIsPressed,
    BOOL bIsDisabled);

Parameters

pDC
[in] A pointer to a device context.

pSlider
[in] A pointer to a CMFCRibbonSlider. The framework draws the thumb for this ribbon slider.

rect
[in] A rectangle that specifies the boundaries of the thumb for the ribbon slider.

bIsHighlighted
[in] A Boolean parameter that indicates if the thumb is highlighted.

bIsPressed
[in] A Boolean parameter that indicates if the thumb is pressed.

bIsDisabled
[in] A Boolean parameter that indicates if the thumb is unavailable.

Remarks

Override this method in a derived visual manager to customize the appearance of the thumb for a CMFCRibbonSlider.

CMFCVisualManager::OnDrawRibbonSliderZoomButton

The framework calls this method when it draws the zoom buttons for a CMFCRibbonSlider object.

virtual void OnDrawRibbonSliderZoomButton(
    CDC* pDC,
    CMFCRibbonSlider* pSlider,
    CRect rect,
    BOOL bIsZoomOut,
    BOOL bIsHighlighted,
    BOOL bIsPressed,
    BOOL bIsDisabled);

Parameters

pDC
[in] A pointer to a device context.

pSlider
[in] A pointer to a CMFCRibbonSlider object. The framework draws this ribbon slider.

rect
[in] A rectangle that specifies the boundaries of the zoom buttons on the ribbon slider.

bIsZoomOut
[in] A Boolean parameter that indicates which button the framework draws. A value of TRUE indicates the left button with a "-" for zoom out. A value of FALSE indicates the right button with a "+" for zoom in.

bIsHighlighted
[in] A Boolean parameter that indicates whether the button is highlighted.

bIsPressed
[in] A Boolean parameter that indicates whether the button is pressed.

bIsDisabled
[in] A Boolean parameter that indicates whether the button is unavailable.

Remarks

By default, the zoom buttons on the ribbon slider are a circle with either a + or - sign in the center. To customize the appearance of zoom buttons, override this method in a derived visual manager.

CMFCVisualManager::OnDrawRibbonStatusBarPane

The framework calls this method when it draws a pane on the status bar.

virtual COLORREF OnDrawRibbonStatusBarPane(
    CDC* pDC,
    CMFCRibbonStatusBar* pBar,
    CMFCRibbonStatusBarPane* pPane);

Parameters

pDC
[in] A pointer to a device context.

pBar
[in] A pointer to the status bar that contains the pane.

pPane
[in] A pointer to a status bar pane. The framework draws this CMFCRibbonStatusBarPane object.

Return Value

A reserved value. The default implementation returns -1.

Remarks

Override this method in a derived visual manager to customize the appearance of a pane on the status bar.

CMFCVisualManager::OnDrawRibbonTabsFrame

The framework calls this method when it draws the frame around a set of ribbon tabs.

virtual COLORREF OnDrawRibbonTabsFrame(
    CDC* pDC,
    CMFCRibbonBar* pWndRibbonBar,
    CRect rectTab);

Parameters

pDC
A pointer to a device context.

pWndRibbonBar
A pointer to a CMFCRibbonBar object. The framework draws the frame for this ribbon bar.

rectTab
A rectangle that specifies the boundaries of the ribbon tabs.

Return Value

A reserved value. By default, this method returns -1.

Remarks

Override this method in a derived visual manager to customize the frame around a set of tabs on the ribbon.

CMFCVisualManager::OnDrawScrollButtons

virtual void OnDrawScrollButtons(
    CDC* pDC,
    const CRect& rect,
    const int nBorderSize,
    int iImage,
    BOOL bHilited);

Parameters

[in] pDC
[in] rect
[in] nBorderSize
[in] iImage
[in] bHilited

Remarks

CMFCVisualManager::OnDrawSeparator

The framework calls this method when it draws a separator.

virtual void OnDrawSeparator(
    CDC* pDC,
    CBasePane* pBar,
    CRect rect,
    BOOL bIsHoriz);

Parameters

pDC
[in] A pointer to the device context for a control bar.

pBar
[in] A pointer to a pane that contains the separator.

rect
[in] A rectangle that specifies the boundaries of the separator.

bIsHoriz
[in] A Boolean parameter that indicates the orientation of a docked pane. A value of TRUE indicates that the pane is docked horizontally. A value of FALSE indicates that the pane is docked vertically.

Remarks

Separators are used on control bars to separate groups of related icons. The default implementation for this method displays the standard separator. Override this method in a derived visual manager to customize the appearance of the separator.

CMFCVisualManager::OnDrawShowAllMenuItems

virtual void OnDrawShowAllMenuItems(
    CDC* pDC,
    CRect rect,
    CMFCVisualManager::AFX_BUTTON_STATE state);

Parameters

[in] pDC
[in] rect
[in] state

Remarks

CMFCVisualManager::OnDrawSpinButtons

The framework calls this method when it draws an instance of the CMFCSpinButtonCtrl Class.

virtual void OnDrawSpinButtons(
    CDC* pDC,
    CRect rectSpin,
    int nState,
    BOOL bOrientation,
    CMFCSpinButtonCtrl* pSpinCtrl);

Parameters

pDC
[in] A pointer to a device context.

rectSpin
[in] A rectangle that specifies the boundaries of the spin control.

nState
[in] A flag that indicates the state of the spin control. See the Remarks section for more information.

bOrientation
[in] A Boolean parameter that specifies the orientation of the spin control. A value of TRUE indicates the spin control is horizontal. Otherwise, it is vertical.

pSpinCtrl
[in] A pointer to a spin control. The framework draws the buttons for this control.

Remarks

The nState parameter indicates the state of the spin control. The parameter is one of the following values:

  • AFX_SPIN_PRESSEDUP

  • AFX_SPIN_PRESSEDDOWN

  • AFX_SPIN_HIGHLIGHTEDUP

  • AFX_SPIN_HIGHLIGHTEDDOWN

  • AFX_SPIN_DISABLED

Override this method in a derived visual manager to customize the appearance of a spin control.

CMFCVisualManager::OnDrawSplitterBorder

The framework calls this method when it draws the border around an instance of the CSplitterWndEx Class.

virtual void OnDrawSplitterBorder(
    CDC* pDC,
    CSplitterWndEx* pSplitterWnd,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pSplitterWnd
[in] A pointer to a splitter window. The framework draws the border for this window.

rect
[in] A rectangle that specifies the boundaries of the splitter window.

Remarks

Override this method in a derived visual manager to customize the appearance of the border for a splitter window.

CMFCVisualManager::OnDrawSplitterBox

The framework calls this method when it draws the drag box for an instance of the CSplitterWndEx Class. The drag box appears when the user selects the splitter bar and changes the dimensions of the child windows.

virtual void OnDrawSplitterBox(
    CDC* pDC,
    CSplitterWndEx* pSplitterWnd,
    CRect& rect);

Parameters

pDC
[in] A pointer to a device context.

pSplitterWnd
[in] A pointer to a splitter window. The framework draws the box for this splitter window.

rect
[in] A rectangle that specifies the boundaries of the splitter window.

Remarks

Override this method in a derived visual manager to customize the appearance of the drag box for a splitter window.

CMFCVisualManager::OnDrawStatusBarPaneBorder

The framework calls this method when it draws the border for a CMFCStatusBar object.

virtual void OnDrawStatusBarPaneBorder(
    CDC* pDC,
    CMFCStatusBar* pBar,
    CRect rectPane,
    UINT uiID,
    UINT nStyle);

Parameters

pDC
[in] A pointer to a device context.

pBar
[in] A pointer to a CMFCStatusBar object. The framework draws this status bar object.

rectPane
[in] A rectangle that specifies the boundaries of the status bar.

uiID
[in] The ID of the status bar.

nStyle
[in] The style of the status bar.

Remarks

Override this method in a derived visual manager to customize the appearance of the border for a CMFCStatusBar object.

CMFCVisualManager::OnDrawStatusBarProgress

The framework calls this method when it draws the progress indicator on the CMFCStatusBar object.

virtual void OnDrawStatusBarProgress(
    CDC* pDC,
    CMFCStatusBar* pStatusBar,
    CRect rectProgress,
    int nProgressTotal,
    int nProgressCurr,
    COLORREF clrBar,
    COLORREF clrProgressBarDest,
    COLORREF clrProgressText,
    BOOL bProgressText);

Parameters

pDC
[in] A pointer to the device context for the status bar.

pStatusBar
[in] The CMFCStatusBar object that contains the progress bar.

rectProgress
[in] A rectangle that specifies the boundaries of the progress bar.

nProgressTotal
[in] The total number for the progress bar.

nProgressCurr
[in] The current progress for the progress bar.

clrBar
[in] A COLORREF parameter that indicates the initial color for the progress bar. The value is either the start of a color gradient or the complete color of the progress bar.

clrProgressBarDest
[in] A COLORREF parameter that indicates the end of a color gradient for the progress bar. If clrProgressBarDest is -1, the framework does not draw the progress bar as a color gradient. Instead, it fills the whole progress bar with the color specified by clrBar.

clrProgressText
[in] A COLORREF parameter that indicates the text color for the textual representation of the current progress. This parameter is ignored if bProgressText is set to FALSE.

bProgressText
[in] A Boolean parameter that indicates whether to display the textual representation of the current progress.

Remarks

Override this method in a derived visual manager to customize the appearance of the CMFCStatusBar object.

CMFCVisualManager::OnDrawStatusBarSizeBox

The framework calls this method when it draws the size box for a CMFCStatusBar.

virtual void OnDrawStatusBarSizeBox(
    CDC* pDC,
    CMFCStatusBar* pStatBar,
    CRect rectSizeBox);

Parameters

pDC
[in] A pointer to a device context.

pStatBar
[in] A pointer to a status bar. The framework draws the size box for this status bar.

rectSizeBox
[in] A rectangle that specifies the boundaries of the size box.

Remarks

Override this method in a derived visual manager to customize the appearance of the size box on a CMFCStatusBar.

CMFCVisualManager::OnDrawTab

The framework calls this method when it draws the tabs for a CMFCBaseTabCtrl object.

virtual void OnDrawTab(
    CDC* pDC,
    CRect rectTab,
    int iTab,
    BOOL bIsActive,
    const CMFCBaseTabCtrl* pTabWnd);

Parameters

pDC
[in] A pointer to a device context.

rectTab
[in] A rectangle that specifies the boundaries of the tab control.

iTab
[in] The index of the tab that the framework draws.

bIsActive
[in] A Boolean parameter that specifies whether the tab is active.

pTabWnd
[in] A pointer to a CMFCBaseTabCtrl object. The framework draws this tab control.

Remarks

A CMFCBaseTabCtrl object calls this method when it processes the WM_PAINT message.

Override this method in a derived class to customize the look of tabs.

CMFCVisualManager::OnDrawTabCloseButton

The framework calls this method when it draws the Close button on the active tab.

virtual void OnDrawTabCloseButton(
    CDC* pDC,
    CRect rect,
    const CMFCBaseTabCtrl* pTabWnd,
    BOOL bIsHighlighted,
    BOOL bIsPressed,
    BOOL bIsDisabled);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the Close button.

pTabWnd
[in] A pointer to a tab control. The framework draws the Close button for this tab control.

bIsHighlighted
[in] A Boolean parameter that indicates whether the Close button is highlighted.

bIsPressed
[in] A Boolean parameter that indicates whether the Close button is pressed.

bIsDisabled
[in] A Boolean parameter that indicates whether the Close button is disabled.

Remarks

Override this method in a derived visual manager to customize the appearance of the Close button on the active tab of pTabWnd.

CMFCVisualManager::OnDrawTabContent

The framework calls this method when it draws the contents located on the interior of an instance of the CMFCBaseTabCtrl Class.

virtual void OnDrawTabContent(
    CDC* pDC,
    CRect rectTab,
    int iTab,
    BOOL bIsActive,
    const CMFCBaseTabCtrl* pTabWnd,
    COLORREF clrText);

Parameters

pDC
[in] A pointer to a device context.

rectTab
[in] A rectangle that specifies the boundaries of the tab interior.

iTab
[in] The zero-based index of the tab. The framework draws the interior of this tab.

bIsActive
[in] A Boolean parameter that indicates whether a tab is active.

pTabWnd
[in] A pointer to the tabbed control that contains the tab being drawn.

clrText
[in] The color of text on the interior of the tab.

Remarks

The interior of a tab contains the text and icons of the tab. Override this method in a derived visual manager to customize the appearance of tabs.

CMFCVisualManager::OnDrawTabsButtonBorder

The framework calls this method when it draws the border of a tab button.

virtual void OnDrawTabsButtonBorder(
    CDC* pDC,
    CRect& rect,
    CMFCButton* pButton,
    UINT uiState,
    CMFCBaseTabCtrl* pWndTab);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the tab button.

pButton
[in] A pointer to a CMFCButton object. The framework draws the border for this CMFCButton instance.

uiState
[in] An unsigned integer that specifies the state of the button.

pWndTab
[in] A pointer to the parent tab window.

Remarks

Override this method in a derived visual manager to customize the appearance of the border of the tab button.

CMFCVisualManager::OnDrawTask

The framework calls this method when it draws a CMFCTasksPane object.

virtual void OnDrawTask(
    CDC* pDC,
    CMFCTasksPaneTask* pTask,
    CImageList* pIcons,
    BOOL bIsHighlighted = FALSE,
    BOOL bIsSelected = FALSE);

Parameters

pDC
[in] A pointer to a device context.

pTask
[in] A pointer to a CMFCTasksPaneTask object. The framework draws this task.

pIcons
[in] A pointer to the image list associated with the task pane. Each task contains an index for an image in this list.

bIsHighlighted
[in] A Boolean parameter that specifies whether the displayed task is highlighted.

bIsSelected
[in] A Boolean parameter that specifies whether the displayed task is selected.

Remarks

The framework displays tasks on the task bar as both an icon and text. The pIcons parameter contains the icon for the task indicated by pTask.

Override this method in a derived class to customize the appearance of tasks on the task bar.

CMFCVisualManager::OnDrawTasksGroupAreaBorder

The framework calls this method when it draws a border around a group on a CMFCTasksPane Class.

virtual void OnDrawTasksGroupAreaBorder(
    CDC* pDC,
    CRect rect,
    BOOL bSpecial = FALSE,
    BOOL bNoTitle = FALSE);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the group area on the task pane.

bSpecial
[in] A Boolean parameter that specifies if the border is highlighted. A value of TRUE indicates that the border is highlighted.

bNoTitle
[in] A Boolean parameter that specifies whether the group area has a title. A value of TRUE indicates that the group area does not have a title.

Remarks

Override this function in a derived class to customize the border around a group area on the task pane.

CMFCVisualManager::OnDrawTasksGroupCaption

The framework calls this method when it draws the caption for a CMFCTasksPaneTaskGroup object.

virtual void OnDrawTasksGroupCaption(
    CDC* pDC,
    CMFCTasksPaneTaskGroup* pGroup,
    BOOL bIsHighlighted = FALSE,
    BOOL bIsSelected = FALSE,
    BOOL bCanCollapse = FALSE);

Parameters

pDC
[in] A pointer to a device context.

pGroup
[in] A pointer to a CMFCTasksPaneTaskGroup object. The framework draws the caption for this group.

bIsHighlighted
[in] A Boolean parameter that indicates whether the group is highlighted.

bIsSelected
[in] A Boolean parameter that indicates whether the group is currently selected.

bCanCollapse
[in] A Boolean parameter that indicates whether the group can be collapsed.

Remarks

The task groups appear on the CMFCTasksPane object.

Override this method in a derived class to customize the caption for a CMFCTasksPaneTaskGroup.

CMFCVisualManager::OnDrawTasksGroupIcon

virtual void OnDrawTasksGroupIcon(
    CDC* pDC,
    CMFCTasksPaneTaskGroup* pGroup,
    int nIconHOffset = 5,
    BOOL bIsHighlighted = FALSE,
    BOOL bIsSelected = FALSE,
    BOOL bCanCollapse = FALSE);

Parameters

[in] pDC
[in] pGroup
[in] nIconHOffset
[in] bIsHighlighted
[in] bIsSelected
[in] bCanCollapse

Remarks

CMFCVisualManager::OnDrawTearOffCaption

The framework calls this method when it draws the caption for a CMFCPopupMenu Class.

virtual void OnDrawTearOffCaption(
    CDC* pDC,
    CRect rect,
    BOOL bIsActive);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the caption.

bIsActive
[in] TRUE if the caption is active; FALSE otherwise.

Remarks

This function is called by the framework when a CMFCPopupMenu object processes a WM_PAINT message and must draw a tear-off caption.

Override this method in a derived class to customize the look of captions for tear-off bars.

CMFCVisualManager::OnDrawToolBoxFrame

virtual void OnDrawToolBoxFrame(
    CDC* pDC,
    const CRect& rect);

Parameters

[in] pDC
[in] rect

Remarks

CMFCVisualManager::OnEraseMDIClientArea

The framework calls this method when it erases the MDI client area.

virtual BOOL OnEraseMDIClientArea(
    CDC* pDC,
    CRect rectClient);

Parameters

pDC
[in] A pointer to a device context.

rectClient
[in] A rectangle that specifies the boundaries of the MDI client area.

Return Value

A reserved value. The default implementation returns FALSE.

Remarks

Override this method to execute custom code when the visual manager erases the MDI client area.

CMFCVisualManager::OnErasePopupWindowButton

virtual void OnErasePopupWindowButton(
    CDC* pDC,
    CRect rectClient,
    CMFCDesktopAlertWndButton* pButton);

Parameters

[in] pDC
[in] rectClient
[in] pButton

Remarks

CMFCVisualManager::OnEraseTabsArea

The framework calls this method when it erases the tab area of a tab window.

virtual void OnEraseTabsArea(
    CDC* pDC,
    CRect rect,
    const CMFCBaseTabCtrl* pTabWnd);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the tab area.

pTabWnd
[in] A pointer to a tab window. The framework erases the tab area for the specified tab window.

Remarks

This function is called by the framework when a CMFCBaseTabCtrl Class object processes a WM_PAINT message and erases the tab area.

Override this method in a derived visual manager to customize the appearance of tabs.

CMFCVisualManager::OnEraseTabsButton

The framework calls this method when it erases the text and icon of a tab button.

virtual void OnEraseTabsButton(
    CDC* pDC,
    CRect rect,
    CMFCButton* pButton,
    CMFCBaseTabCtrl* pWndTab);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the tab button.

pButton
[in] A pointer to a tab button. The framework erases the text and icon for this button.

pWndTab
[in] A pointer to the tab control that contains the tab button.

Remarks

The framework erases the text and icon for a button when a CMFCBaseTabCtrl object processes the WM_ERASEBKGND message.

Override this method in a derived visual manager to customize the appearance of tab buttons.

CMFCVisualManager::OnEraseTabsFrame

The framework calls this method when it erases a frame on a CMFCBaseTabCtrl Class.

virtual BOOL OnEraseTabsFrame(
    CDC* pDC,
    CRect rect,
    const CMFCBaseTabCtrl* pTabWnd);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the tab window.

pTabWnd
[in] A pointer to a tab window. The framework erases a frame for this CMFCBaseTabCtrl.

Return Value

TRUE if the method is successful; FALSE otherwise.

Remarks

This method fills the area indicated by rect with the background color of the active tab. It is called when a CMFCBaseTabCtrl object processes a WM_PAINT message and erases a tab frame.

CMFCVisualManager::OnFillAutoHideButtonBackground

The framework calls this method when it fills the background of an auto-hide button.

virtual void OnFillAutoHideButtonBackground(
    CDC* pDC,
    CRect rect,
    CMFCAutoHideButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the auto-hide button.

pButton
[in] A pointer to a CMFCAutoHideButton object. The framework fills the background for this auto-hide button.

Remarks

Override this method in a derived visual manager to customize the appearance of an auto-hide button.

CMFCVisualManager::OnFillBarBackground

The framework calls this method when it fills the background of a CBasePane object.

virtual void OnFillBarBackground(
    CDC* pDC,
    CBasePane* pBar,
    CRect rectClient,
    CRect rectClip,
    BOOL bNCArea = FALSE);

Parameters

pDC
[in] A pointer to the device context for a control bar.

pBar
[in] A pointer to a CBasePane object. The framework fills the background of this pane.

rectClient
[in] A rectangle that specifies the boundaries of the pane.

rectClip
[in] A rectangle that specifies the clipping area of the pane.

bNCArea
[in] A reserved value.

Remarks

The default implementation of this method fills the background of the bar with the 3d background color from the global variable afxGlobalData. Override this method in a derived visual manager to customize the background of a pane.

Example

The following example demonstrates how to use the OnFillBarBackground in the CMFCVisualManager class. This code snippet is part of the Outlook Demo sample.

// CDC* pDC
// CRect rectClient
// The this pointer points to a CMailBar class which extends the CPaneDialog class.
CMFCVisualManager::GetInstance()->OnFillBarBackground(pDC, this, rectClient, rectClient);

CMFCVisualManager::OnFillButtonInterior

The framework calls this method when it fills the background of a toolbar button.

virtual void OnFillButtonInterior(
    CDC* pDC,
    CMFCToolBarButton* pButton,
    CRect rect,
    CMFCVisualManager::AFX_BUTTON_STATE state);

Parameters

pDC
[in] A pointer to the device context of a toolbar button.

pButton
[in] A pointer to a CMFCToolBarButton. The framework fills the background for this button.

rect
[in] A rectangle that specifies the boundaries of the toolbar button.

state
[in] The state of the toolbar button.

Remarks

The default implementation of this method uses the default color to fill the background. Override this method in a derived visual manager to customize the background of a toolbar button.

The possible states of a toolbar button are ButtonsIsRegular, ButtonsIsPressed, or ButtonsIsHighlighted.

CMFCVisualManager::OnFillCaptionBarButton

virtual COLORREF OnFillCaptionBarButton(
    CDC* pDC,
    CMFCCaptionBar* pBar,
    CRect rect,
    BOOL bIsPressed,
    BOOL bIsHighlighted,
    BOOL bIsDisabled,
    BOOL bHasDropDownArrow,
    BOOL bIsSysButton);

Parameters

[in] pDC
[in] pBar
[in] rect
[in] bIsPressed
[in] bIsHighlighted
[in] bIsDisabled
[in] bHasDropDownArrow
[in] bIsSysButton

Return Value

Remarks

CMFCVisualManager::OnFillCommandsListBackground

The framework calls this method when it fills the background of a toolbar button that belongs to a command list. This command list is part of the customization dialog.

virtual COLORREF OnFillCommandsListBackground(
    CDC* pDC,
    CRect rect,
    BOOL bIsSelected = FALSE);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the button.

bIsSelected
[in] A Boolean parameter that indicates whether the button is selected.

Return Value

The text color for the toolbar button.

Remarks

For more information about the customization list, see CMFCToolBarButton::OnDrawOnCustomizeList. The default implementation for this method fills the background based on the color scheme of the currently selected skin.

CMFCVisualManager::OnFillHeaderCtrlBackground

The framework calls this method when it fills the background of a header control.

virtual void OnFillHeaderCtrlBackground(
    CMFCHeaderCtrl* pCtrl,
    CDC* pDC,
    CRect rect);

Parameters

pCtrl
[in] A pointer to a CMFCHeaderCtrl object. The framework fills the background for this header control.

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the header control.

Remarks

Override this method in a derived visual manager to customize the appearance of a header control.

CMFCVisualManager::OnFillMiniFrameCaption

The framework calls this method when it fills the caption bar of a mini frame window.

virtual COLORREF OnFillMiniFrameCaption(
    CDC* pDC,
    CRect rectCaption,
    CPaneFrameWnd* pFrameWnd,
    BOOL bActive);

Parameters

pDC
[in] A pointer to a device context.

rectCaption
[in] A rectangle that specifies the boundaries of the caption bar.

pFrameWnd
[in] A pointer to a mini frame window. The framework draws the caption bar for this window.

bActive
[in] A Boolean parameter that indicates if the window is active.

Return Value

The color that is used to fill the background of the caption bar.

Remarks

The default implementation for this method fills the caption bar with the current caption color for the active skin.

CMFCVisualManager::OnFillOutlookBarCaption

The framework calls this method when it fills the background of an Outlook caption bar.

virtual void OnFillOutlookBarCaption(
    CDC* pDC,
    CRect rectCaption,
    COLORREF& clrText);

Parameters

pDC
[in] A pointer to a device context.

rectCaption
[in] A rectangle that specifies the boundaries of the caption bar.

clrText
[out] A reference to a COLORREF parameter. The method writes the color of text on the caption bar to this parameter.

Remarks

The default implementation of this method fills the caption bar with the color for shadows based on the current skin. Override this method in a derived visual manager to customize the color of the Outlook caption bar.

CMFCVisualManager::OnFillOutlookPageButton

The framework calls this method when it fills the interior of an Outlook page button.

virtual void OnFillOutlookPageButton(
    CDC* pDC,
    const CRect& rect,
    BOOL bIsHighlighted,
    BOOL bIsPressed,
    COLORREF& clrText);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the Outlook page button.

bIsHighlighted
[in] A Boolean parameter that specifies whether the button is highlighted.

bIsPressed
[in] A Boolean parameter that specifies whether the button is pressed.

clrText
[out] A reference to a COLORREF parameter. This method stores the text color of the outlook page button in this parameter.

Remarks

Override this function in a derived visual manager to customize the appearance of Outlook page buttons.

CMFCVisualManager::OnFillPopupWindowBackground

The framework calls this method when it fills the background of a pop-up window.

virtual void OnFillPopupWindowBackground(
    CDC* pDC,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the popup window.

Remarks

Override this method in a derived visual manager to customize the appearance of pop-up windows.

CMFCVisualManager::OnFillRibbonButton

The framework calls this method when it fills the interior of a ribbon button.

virtual COLORREF OnFillRibbonButton(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to a CMFCRibbonButton object. The framework fills the interior of this ribbon button.

Return Value

The color of text for the ribbon button specified by pButton if the ribbon button supports text. A value of -1 if text is invalid for the ribbon button.

Remarks

Override this method in a derived visual manager to customize the appearance of ribbon buttons.

CMFCVisualManager::OnFillRibbonEdit

The framework calls this method when it fills the interior of an instance of the CMFCRibbonRichEditCtrl class.

virtual void OnFillRibbonEdit(
    CDC* pDC,
    CMFCRibbonRichEditCtrl* pEdit,
    CRect rect,
    BOOL bIsHighlighted,
    BOOL bIsPaneHighlighted,
    BOOL bIsDisabled,
    COLORREF& clrText,
    COLORREF& clrSelBackground,
    COLORREF& clrSelText);

Parameters

pDC
[in] A pointer to a device context.

pEdit
[in] A pointer to a CMFCRibbonRichEditCtrl object. The framework fills the interior of this edit control.

rect
[in] A rectangle that specifies the boundaries of the edit control.

bIsHighlighted
[in] A Boolean parameter that indicates whether the edit control is highlighted.

bIsPaneHighlighted
[in] A Boolean parameter that indicates whether the parent pane is highlighted.

bIsDisabled
[in] A Boolean parameter that indicates whether the edit control is unavailable.

clrText
[in] A reference to the text color of the edit control.

clrSelBackground
[in] A reference to the background color of the edit control when it is highlighted.

clrSelText
[in] A reference to the color of selected text on the edit control.

Remarks

The CMFCRibbonRichEditCtrl indicated by pEdit can be a part of a combo box button on the ribbon.

Override this method in a derived visual manager to customize the appearance of a CMFCRibbonRichEditCtrl.

CMFCVisualManager::OnFillRibbonMainPanelButton

The framework calls this method when it fills the interior of a ribbon button located on the Main panel.

virtual COLORREF OnFillRibbonMainPanelButton(
    CDC* pDC,
    CMFCRibbonButton* pButton);

Parameters

pDC
[in] A pointer to a device context.

pButton
[in] A pointer to a CMFCRibbonButton Class object. The framework fills this ribbon button.

Return Value

The color of text for the ribbon button specified by pButton if the ribbon button supports text. A value of -1 if text is invalid for the ribbon button.

Remarks

Override this method in a derived visual manager to customize the appearance of ribbon buttons on the Main panel.

CMFCVisualManager::OnFillRibbonMenuFrame

The framework calls this method when it fills the menu frame of the ribbon panel.

virtual void OnFillRibbonMenuFrame(
    CDC* pDC,
    CMFCRibbonMainPanel* pPanel,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pPanel
[in] A pointer to an instance of the CMFCRibbonMainPanel Class. The framework fills the menu frame for this ribbon panel.

rect
[in] A rectangle that specifies the boundaries of the menu frame.

Remarks

Override this method in a derived visual manager to customize the appearance of the menu bar for the CMFCRibbonMainPanel.

CMFCVisualManager::OnFillRibbonQuickAccessToolBarPopup

virtual void OnFillRibbonQuickAccessToolBarPopup(
    CDC* pDC,
    CMFCRibbonPanelMenuBar* pMenuBar,
    CRect rect);

Parameters

[in] pDC
[in] pMenuBar
[in] rect

Remarks

CMFCVisualManager::OnFillSplitterBackground

The framework calls this method when it fills the background of a splitter window.

virtual void OnFillSplitterBackground(
    CDC* pDC,
    CSplitterWndEx* pSplitterWnd,
    CRect rect);

Parameters

pDC
[in] A pointer to a device context.

pSplitterWnd
[in] A pointer to an instance of the CSplitterWndEx Class. The framework fills the background for this splitter window.

rect
[in] A rectangle that specifies the boundaries of the splitter window.

Remarks

Override this method in a derived visual manager to customize the appearance of a splitter window.

CMFCVisualManager::OnFillTab

The framework calls this method when it fills the background of a tab window.

virtual void OnFillTab(
    CDC* pDC,
    CRect rectFill,
    CBrush* pbrFill,
    int iTab,
    BOOL bIsActive,
    const CMFCBaseTabCtrl* pTabWnd);

Parameters

pDC
[in] A pointer to a device context.

rectFill
[in] A rectangle that specifies the boundaries for the tab window.

pbrFill
[in] A pointer to a brush. The framework uses this brush to fill the tab window.

iTab
[in] The zero-based tab index of a tab for which the framework fills the background.

bIsActive
[in] TRUE if the tab is active; otherwise FALSE.

pTabWnd
[in] A pointer to the parent tab control.

Remarks

Override this method in a derived visual manager to customize the appearance of tabs.

CMFCVisualManager::OnFillTasksGroupInterior

The framework calls this method when it fills the interior of a CMFCTasksPaneTaskGroup object.

virtual void OnFillTasksGroupInterior(
    CDC* pDC,
    CRect rect,
    BOOL bSpecial = FALSE);

Parameters

pDC
[in] A pointer to a device context.

rect
[in] A rectangle that specifies the boundaries of the task group.

bSpecial
[in] A Boolean that indicates if the interior is filled with a special color.

Remarks

Override this method in a derived visual manager to customize the appearance of a task group.

CMFCVisualManager::OnFillTasksPaneBackground

The framework calls this method when it fills the background of a CMFCTasksPane control.

virtual void OnFillTasksPaneBackground(
    CDC* pDC,
    CRect rectWorkArea);

Parameters

pDC
[in] A pointer to a device context.

rectWorkArea
[in] A rectangle that specifies the boundaries of the task pane.

Remarks

Override this method in a derived visual manager to customize the appearance of a CMFCTasksPane object.

CMFCVisualManager::OnHighlightMenuItem

The framework calls this method when it draws a highlighted menu item.

virtual void OnHighlightMenuItem(
    CDC* pDC,
    CMFCToolBarMenuButton* pButton,
    CRect rect,
    COLORREF& clrText);

Parameters

pDC
[in] A pointer to the device context for a menu.

pButton
[in] A pointer to a CMFCToolBarMenuButton object to display. The default implementation does not use this parameter.

rect
[in] A rectangle that specifies the boundaries of the menu item.

clrText
[in] The current text color of highlighted menu items. The default implementation does not use this parameter.

Remarks

The default implementation of this method does not use the parameters pButton or clrText. It fills the rectangle specified by rect with the standard background color.

Override this method in a derived visual manager to customize the appearance of highlighted menu items. Use the clrText parameter to modify the text color of a highlighted menu item.

CMFCVisualManager::OnHighlightRarelyUsedMenuItems

The framework calls this method when it draws a highlighted menu command.

virtual void OnHighlightRarelyUsedMenuItems(
    CDC* pDC,
    CRect rectRarelyUsed);

Parameters

pDC
[in] A pointer to a device context.

rectRarelyUsed
[in] A rectangle that specifies the boundaries of the highlighted command.

Remarks

Override this method in a derived visual manager to customize the appearance of highlighted menu commands.

CMFCVisualManager::OnNcActivate

virtual BOOL OnNcActivate(
    CWnd* pWnd,
    BOOL bActive);

Parameters

[in] pWnd
[in] bActive

Return Value

Remarks

CMFCVisualManager::OnNcPaint

The framework calls this method when it draws the non-client area.

virtual BOOL OnNcPaint(
    CWnd* pWnd,
    const CObList& lstSysButtons,
    CRect rectRedraw);

Parameters

pWnd
[in] A pointer to the window whose non-client area the framework draws.

lstSysButtons
[in] A list of system buttons. These are also known as caption buttons.

rectRedraw
[in] A rectangle that specifies the boundaries of the non-client area.

Return Value

A reserved value. The default implementation returns FALSE.

Remarks

Override this method in a derived visual manager to customize the appearance of the window frame and caption buttons.

CMFCVisualManager::OnSetWindowRegion

The framework calls this method after it sets a region that contains frames and pop-up menus.

virtual BOOL OnSetWindowRegion(
    CWnd* pWnd,
    CSize sizeWindow);

Parameters

pWnd
[in] A pointer to the window with the region that changed.

sizeWindow
[in] The size of the window.

Return Value

TRUE if the method is successful; FALSE otherwise.

Remarks

The framework calls this method to notify the visual manager that a region has been set for frames and pop-up menus. For more information, see CWindow::SetWindowRgn.

CMFCVisualManager::OnUpdateSystemColors

The framework calls this function when it changes the system colors.

virtual void OnUpdateSystemColors();

Remarks

The framework calls this method as a part of processing the WM_SYSCOLORCHANGE message. The default implementation does nothing. Override this method in a derived visual manager if you want to execute custom code when the colors change in your application.

CMFCVisualManager::RedrawAll

Immediately redraws all the control bars in the application.

static void RedrawAll();

CMFCVisualManager::RibbonCategoryColorToRGB

virtual COLORREF RibbonCategoryColorToRGB(AFX_RibbonCategoryColor color);

Parameters

[in] color

Return Value

Remarks

CMFCVisualManager::SetDefaultManager

Sets the default manager.

static void SetDefaultManager(CRuntimeClass* pRTI);

Parameters

pRTI
[in] A pointer to the runtime information for a visual manager.

Remarks

Use the CMFCVisualManager class and any derived visual managers to customize the appearance of your application. After you set the default visual manager, this method redraws your application by using the new visual manager. For more information about how to use visual managers, see Visualization Manager.

Use this method to change the visual manager that your application uses.

CMFCVisualManager::SetEmbossDisabledImage

Enables or disables the embossed mode for disabled toolbar images.

void SetEmbossDisabledImage (BOOL bEmboss = TRUE);

Parameters

bEmboss
[in] A Boolean parameter that indicates whether to enable embossed mode for disabled toolbar images.

Remarks

Use the function CMFCVisualManager::IsEmbossDisabledImage to determine whether embossed mode is enabled.

CMFCVisualManager::SetFadeInactiveImage

Enables or disables the lighting effect for inactive images on a menu or toolbar.

void SetFadeInactiveImage(BOOL bFade = TRUE);

Parameters

bFade
[in] A Boolean parameter that specifies whether to enable the lighting effect.

Remarks

This feature controls whether inactive images appear faded on a menu or toolbar. Use the method CMFCVisualManager::IsFadeInactiveImage to determine whether this feature is enabled.

CMFCVisualManager::SetMenuFlatLook

Sets a flag that indicates whether the menu buttons appear flat. Otherwise, they appear three-dimensional.

void SetMenuFlatLook(BOOL bMenuFlatLook = TRUE);

Parameters

bMenuFlatLook
[in] A Boolean parameter that indicates whether the menu buttons appear flat.

Remarks

By default, this feature is not enabled.

CMFCVisualManager::SetMenuShadowDepth

Sets the width and height of the menu shadow.

void SetMenuShadowDepth(int nDepth);

Parameters

nDepth
[in] An integer that specifies the depth of the menu shadow in pixels.

Remarks

The height and width of the menu shadow must be identical. The default value is 7 pixels.

CMFCVisualManager::SetShadowHighlightedImage

Sets a flag that indicates whether the CMFCVisualManager displays shadows for highlighted images.

void SetShadowHighlightedImage(BOOL bShadow = TRUE);

Parameters

bShadow
[in] A Boolean parameter that indicates whether the visual manager displays a shadow under highlighted images.

Remarks

By default, this feature is disabled.

See also

Hierarchy Chart
Classes
CMFCVisualManager::GetInstance
Visualization Manager