Dela via


AFX_GLOBAL_DATA Structure

The AFX_GLOBAL_DATA structure contains fields and methods that are used to manage the framework or customize the appearance and behavior of your application.

struct AFX_GLOBAL_DATA

Members

Public Constructors

Name

Description

AFX_GLOBAL_DATA::AFX_GLOBAL_DATA

Constructs a AFX_GLOBAL_DATA structure.

AFX_GLOBAL_DATA::~AFX_GLOBAL_DATA

Destructor.

Public Methods

Name

Description

AFX_GLOBAL_DATA::CleanUp

Releases resources that are allocated by the framework, such as brushes, fonts, and DLLs.

AFX_GLOBAL_DATA::DrawParentBackground

Draws the background of a control's parent in the specified area.

AFX_GLOBAL_DATA::DrawTextOnGlass

Draws the specified text in the visual style of the specified theme.

AFX_GLOBAL_DATA::DwmDefWindowProc

Provides a simple way to call the Windows DwmDefWindowProc method.

AFX_GLOBAL_DATA::DwmExtendFrameIntoClientArea

Provides a simple way to call the Windows DwmExtendFrameIntoClientArea method.

AFX_GLOBAL_DATA::DwmIsCompositionEnabled

Provides a simple way to call the Windows DwmIsCompositionEnabled method.

AFX_GLOBAL_DATA::ExcludeTag

Removes the specified XML tag pair from a specified buffer.

AFX_GLOBAL_DATA::GetColor

Retrieves the current color of the specified user interface element.

AFX_GLOBAL_DATA::GetHandCursor

Retrieves the predefined cursor that resembles a hand and whose identifier is IDC_HAND.

AFX_GLOBAL_DATA::GetNonClientMetrics

Retrieves the metrics associated with the nonclient area of nonminimized windows.

AFX_GLOBAL_DATA::GetTextHeight

Retrieves the height of text characters in the current font.

AFX_GLOBAL_DATA::Is32BitIcons

Indicates whether predefined 32-bit icons are supported.

AFX_GLOBAL_DATA::IsHighContrastMode

Indicates whether images are currently displayed in high contrast.

AFX_GLOBAL_DATA::OnSettingChange

Detects the current state of the desktop's menu animation and taskbar autohide features.

AFX_GLOBAL_DATA::RegisterWindowClass

Registers the specified MFC window class.

AFX_GLOBAL_DATA::Resume

Reinitializes internal function pointers that access methods that support Windows themes and visual styles.

AFX_GLOBAL_DATA::SetLayeredAttrib

Provides a simple way to call the Windows SetLayeredWindowAttributes method.

AFX_GLOBAL_DATA::SetMenuFont

Creates the specified logical font.

AFX_GLOBAL_DATA::UpdateFonts

Reintializes the logical fonts that are used by the framework.

AFX_GLOBAL_DATA::UpdateSysColors

Initializes the colors, color depth, brushes, pens, and images that are used by the framework.

Protected Methods

Name

Description

AFX_GLOBAL_DATA::EnableAccessibilitySupport

Enables or disables Microsoft Active Accessibility support. Active Accessibility provides reliable methods for exposing information about user interface elements.

AFX_GLOBAL_DATA::IsAccessibilitySupport

Indicates whether Microsoft Active Accessibility support is enabled.

AFX_GLOBAL_DATA::IsWindowsLayerSupportAvailable

Indicates whether the operating system supports layered windows.

Data Members

Name

Description

AFX_GLOBAL_DATA::bIsOSAlphaBlendingSupport

Indicates whether the current operating system supports alpha blending.

AFX_GLOBAL_DATA::m_bUseBuiltIn32BitIcons

Indicates whether the framework uses predefined 32-bit color icons or icons of a lower resolution.

AFX_GLOBAL_DATA::m_bUseSystemFont

Indicates whether a system font is used for menus, toolbars, and ribbons.

AFX_GLOBAL_DATA::m_hcurHand

Stores the handle for the hand cursor.

AFX_GLOBAL_DATA::m_hcurStretch

Stores the handle for the horizontal stretch cursor.

AFX_GLOBAL_DATA::m_hcurStretchVert

Stores the handle for the vertical stretch cursor.

AFX_GLOBAL_DATA::m_hiconTool

Stores the handle for the tool icon.

AFX_GLOBAL_DATA::m_nAutoHideToolBarMargin

Specifies the offset from the leftmost autohide toolbar to the left side of the docking bar.

AFX_GLOBAL_DATA::m_nAutoHideToolBarSpacing

Specifies the gap between autohide toolbars.

AFX_GLOBAL_DATA::m_nDragFrameThicknessDock

Specifies the thickness of the drag frame that is used to communicate the docked state.

AFX_GLOBAL_DATA::m_nDragFrameThicknessFloat

Specifies the thickness of the drag frame that is used to communicate the floating state.

Remarks

Most of the data in the AFX_GLOBAL_DATA structure is initialized when your application starts.

Inheritance Hierarchy

AFX_GLOBAL_DATA

Requirements

Header: afxglobals.h

See Also

Concepts

MFC Hierarchy Chart

Other Resources

Classes (MFC Feature Pack)