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 |
---|---|
|
|
|
|
Called by the framework to determine whether 3D tabs should always be drawn by using a highlight color. |
|
|
|
|
|
|
|
|
|
|
|
Called by the framework to retrieve the text color for an auto-hide button. |
|
Called by the framework to retrieve the increased button size that the current visual manager requires to draw a button. |
|
Called by the framework to retrieve the text color of a caption bar. |
|
Called by the framework to retrieve the size for the border of a docked tabbed bar. |
|
|
|
Returns a pointer to the CMFCVisualManager object. |
|
Called by the framework to retrieve the border size of the MDITabs window. |
|
|
|
Returns a value that determines the width and height of a menu shadow. |
|
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. |
|
Called by the framework to retrieve the size of the border for a popup menu. |
|
Called by the framework to retrieve the background color of a property list. |
|
Called by the framework to retrieve the text color of a property list. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns a theme used to display smart docking markers. |
|
|
|
Called by the framework to retrieve the set of colors to use when it draws a tab frame. |
|
|
|
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. |
|
Called by the framework to determine the color of the text that is displayed on disabled toolbar elements. |
|
|
|
|
|
Specifies whether auto-hide buttons overlap. |
|
Specifies whether the current visual manager draws a border around tabbed docking bars. |
|
Specifies whether disabled images should be embossed. |
|
Called by the framework to determine whether inactive images on a toolbar or menu appear dimmed. |
|
Specifies whether menu buttons have a flattened appearance. |
|
Specifies whether the visual manager implements Office XP-style menus. |
|
Specifies whether the current visual manager implements owner-drawn captions of a frame window. |
|
Specifies whether a highlighted image has a shadow. |
|
Called by the framework when it draws the border for an auto-hide button. |
|
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. |
|
Called by the framework when it draws a browse button that belongs to an edit control (CMFCEditBrowseCtrl Class). |
|
Called by the framework when it draws the border of a toolbar button. |
|
|
|
Called by the framework when it draws the caption bar border. |
|
|
|
|
|
Called by the framework when it draws a caption button. |
|
|
|
|
|
Called by the framework when it draws the border of a combo box button. |
|
Called by the framework when it draws a combo box drop button. |
|
|
|
Called by the framework when it draws the default ribbon image. |
|
Called by the framework when it draws a border around a CMFCToolBarEditBoxButton object. |
|
|
|
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. |
|
Called by the framework when it draws the border that contains the header control. |
|
Called by the framework when it draws the header control sort arrow. |
|
|
|
Called by the framework when it draws a menu border. |
|
|
|
|
|
|
|
|
|
Called by the framework when it draws a menu scroll button. |
|
|
|
Called by the framework when it draws the menu system buttons Close, Minimize, Maximize, and Restore. |
|
|
|
Called by the framework when it draws the splitter for an Outlook bar. The splitter is a horizontal bar used to group controls. |
|
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. |
|
Called by the framework when it draws the border of a CPane Class. |
|
Called by the framework when it draws the caption for a CPane. |
|
|
|
|
|
|
|
|
|
Called by the framework when it draws the Main Button on the ribbon. |
|
Called by the framework when it draws the border of a ribbon button. |
|
Called by the framework when it draws a group of buttons on the ribbon. |
|
Called by the framework when it draws the caption of the main frame, but only if the ribbon bar is integrated with the frame. |
|
Called by the framework when it draws a caption button located on the ribbon bar. |
|
Called by the framework when it draws a ribbon category. |
|
Called by the framework when it draws the caption for a ribbon category. |
|
|
|
Called by the framework when it draws the tab for a ribbon category. |
|
|
|
|
|
|
|
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. |
|
|
|
|
|
|
|
|
|
Called by the framework when it draws the ribbon label. |
|
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. |
|
Called by the framework when it draws the frame around the Main panel. |
|
|
|
Called by the framework when it draws a ribbon panel. |
|
Called by the framework when it draws the caption of a ribbon panel. |
|
Called by the framework when it draws a CMFCRibbonProgressBar object. |
|
Called by the framework when it draws a separator on a ribbon's Quick Access Toolbar. |
|
Called by the framework when it draws a frame around a recent files list. |
|
Called by the framework when it draws the channel of a CMFCRibbonSlider object. |
|
Called by the framework when it draws the thumb of a CMFCRibbonSlider object. |
|
Called by the framework when it draws the zoom buttons of a CMFCRibbonSlider object. |
|
Called by the framework when it draws the status-bar pane of a ribbon. |
|
Called by the framework when it draws a frame around a set of ribbon tabs. |
|
|
|
Called by the framework when it draws a separator. The separator is typically used on a control bar to separate groups of icons. |
|
|
|
Called by the framework when it draws spin buttons. |
|
Called by the framework when it draws the border of a split window. |
|
Called by the framework when it draws the splitter drag box for a split window. |
|
Called by the framework when it draws the border for a status-bar pane. |
|
Called by the framework when it draws the status-bar progress indicator. |
|
Called by the framework when it draws the status-bar size box. |
|
Called by the framework when it draws a CMFCTabCtrl object. |
|
Called by the framework when it draws the Close button on the active tab. |
|
Called by the framework when it draws the tab interior (images, texts). |
|
Called by the framework when it draws the border of a tab button. |
|
Called by the framework when it draws a task on the task pane. |
|
Called by the framework when it draws a border around a group area on the task pane. |
|
Called by the framework when it draws the caption for a task group on the task pane. |
|
|
|
Called by the framework when it draws the tear-off caption for a tear-off bar. |
|
|
|
Called by the framework when it erases the MDI client area. |
|
|
|
Called by the framework when it erases the tab area in a tab window. |
|
Called by the framework when it erases the icon and text of a tab button. |
|
Called by the framework when it erases a tab frame. |
|
Called by the framework when it fills the background of an auto-hide button. |
|
Called by the framework when it fills the background of a control bar. |
|
Called by the framework when it fills the background of a toolbar button. |
|
|
|
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. |
|
Called by the framework when it fills the background of a header control. |
|
Called by the framework when it fills the caption of a mini frame window. |
|
Called by the framework when it fills the background of an Outlook bar caption. |
|
Called by the framework when it fills the interior of an Outlook page button. |
|
Called by the framework when it fills the background of a popup window. |
|
Called by the framework when it fills the interior of a ribbon button. |
|
Called by the framework when it fills the interior of a ribbon edit control. |
|
Called by the framework when it fills the interior of a ribbon button located on the Main panel. |
|
Called by the framework when it fills the menu frame of the main ribbon panel. |
|
|
|
Called by the framework when it fills the background of a split window. |
|
Called by the framework when it fills the background of a tab. |
|
Called by the framework when it fills the interior of a CMFCTasksPaneTaskGroup object on the CMFCTasksPane. |
|
Called by the framework when it fills the background of a CMFCTasksPane control. |
|
Called by the framework when it draws a highlighted menu item. |
|
Called by the framework when it draws a highlighted and rarely used menu item. |
|
Called by the framework when it draws the non-client area. |
|
Called by the framework when it sets a region that contains frames and popup menus. |
|
Called by the framework when it changes the system color setting. |
|
Redraws all control bars in the application. |
|
|
|
Sets the default visual manager. |
|
Enables or disables the embossed mode for disabled toolbar images. |
|
Enables or disables the lighting effect for inactive images on a menu or toolbar. |
|
Sets a flag indicating whether the application menu buttons have a flattened appearance. |
|
Sets the width and height of the menu shadow. |
|
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
Requirements
Header: afxvisualmanager.h
See Also
Reference
CMFCVisualManager::GetInstance