Share via


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.

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.

Example

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

See Also

Reference

Hierarchy Chart

CMFCVisualManager::GetInstance

Concepts

Visualization Manager

Other Resources

MFC Classes