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::D2D1MakeRotateMatrix

Creates a rotation transformation that rotates by a specified angle around a specified point.

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::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::GetDirect2dFactory

Returns a pointer to the ID2D1Factory interface that is stored in the global data. If the interface is not initialized, it is created and has the default parameters.

AFX_GLOBAL_DATA::GetHandCursor

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

AFX_GLOBAL_DATA::GetITaskbarList

Creates and stores in the global data a pointer to ITaskBarList interface.

AFX_GLOBAL_DATA::GetITaskbarList3

Creates and stores in the global data a pointer to ITaskBarList3 interface.

AFX_GLOBAL_DATA::GetNonClientMetrics

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

AFX_GLOBAL_DATA::GetShellAutohideBars

Determines positions of Shell auto hide bars.

AFX_GLOBAL_DATA::GetTextHeight

Retrieves the height of text characters in the current font.

AFX_GLOBAL_DATA::GetWICFactory

Returns a pointer to the IWICImagingFactory interface that is stored in the global data. If the interface is not initialized, it is created and has the default parameters.

AFX_GLOBAL_DATA::GetWriteFactory

Returns a pointer to the IDWriteFactory interface that is stored in the global data. If the interface is not initialized, it is created and has the default parameters.

AFX_GLOBAL_DATA::IsD2DInitialized

Initializes D2D, DirectWrite, and WIC factories. Call this method before the main window is initialized.

AFX_GLOBAL_DATA::Is32BitIcons

Indicates whether predefined 32-bit icons are supported.

AFX_GLOBAL_DATA::IsD2DInitialized

Determines whether the D2D was initialized.

AFX_GLOBAL_DATA::IsDwmCompositionEnabled

Provides a simple way to call the Windows DwmIsCompositionEnabled method.

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::ReleaseTaskBarRefs

Releases interfaces obtained through GetITaskbarList and GetITaskbarList3 methods.

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::ShellCreateItemFromParsingName

Creates and initializes a Shell item object from a parsing name.

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::bIsWindows7

Indicates whether the application is being executed under Windows 7 OS or higher

AFX_GLOBAL_DATA::clrActiveCaptionGradient

Specifies gradient color of active caption. Generally used for docking panes.

AFX_GLOBAL_DATA::clrInactiveCaptionGradient

Specifies gradient color of inactive active caption. Generally used for docking panes.

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

Reference

Hierarchy Chart

Other Resources

Structures, Styles, Callbacks, and Message Maps