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.

Syntax

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

AFX_GLOBAL_DATA::bIsOSAlphaBlendingSupport

Indicates whether the operating system supports alpha blending.

BOOL  bIsOSAlphaBlendingSupport;

Remarks

TRUE indicates alpha blending is supported; otherwise, FALSE.

AFX_GLOBAL_DATA::CleanUp

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

void CleanUp();

AFX_GLOBAL_DATA::D2D1MakeRotateMatrix

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

HRESULT D2D1MakeRotateMatrix(
    FLOAT angle,
    D2D1_POINT_2F center,
    D2D1_MATRIX_3X2_F *matrix);

Parameters

angle
The clockwise rotation angle, in degrees.

center
The point about which to rotate.

matrix
When this method returns, contains the new rotation transformation. You must allocate storage for this parameter.

Return Value

Returns S_OK if successful, or an error value otherwise.

AFX_GLOBAL_DATA::DrawParentBackground

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

BOOL DrawParentBackground(
    CWnd* pWnd,
    CDC* pDC,
    LPRECT lpRect = NULL);

Parameters

pWnd
[in] Pointer to a control's window.

pDC
[in] Pointer to a device context.

lpRect
[in] Pointer to a rectangle that bounds the area to draw. The default value is NULL.

Return Value

TRUE if this method is successful; otherwise, FALSE.

AFX_GLOBAL_DATA::DrawTextOnGlass

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

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

Parameters

hTheme
[in] Handle to the theme data of a window, or NULL. The framework uses the specified theme to draw the text if this parameter is not NULL and themes are supported. Otherwise, the framework does not use a theme to draw the text.

Use the OpenThemeData method to create an HTHEME.

pDC
[in] Pointer to a device context.

iPartId
[in] The control part that has the desired text appearance. For more information, see the Parts column of the table in Parts and States. If this value is 0, the text is drawn in the default font, or a font selected into the device context.

iStateId
[in] The control state that has the desired text appearance. For more information, see the States column of the table in Parts and States.

strText
[in] The text to draw.

rect
[in] The boundary of the area in which the specified text is drawn.

dwFlags
[in] A bitwise combination (OR) of flags that specify how the specified text is drawn.

If the hTheme parameter is NULL or if themes are not supported and enabled, the nFormat parameter of the CDC::DrawText method describes the valid flags. If themes are supported, the dwFlags parameter of the DrawThemeTextEx method describes the valid flags.

nGlowSize
[in] The size of a glow effect that is drawn on the background before drawing the specified text. The default value is 0.

clrText
[in] The color in which the specified text is drawn. The default value is the default color.

Return Value

TRUE if a theme is used to draw the specified text; otherwise, FALSE.

Remarks

A theme defines the visual style of an application. A theme is not used to draw the text if the hTheme parameter is NULL, or if the DrawThemeTextEx method is not supported, or if Desktop Window Manager (DWM) composition is disabled.

AFX_GLOBAL_DATA::EnableAccessibilitySupport

Enables or disables Microsoft Active Accessibility support.

void EnableAccessibilitySupport(BOOL bEnable=TRUE);

Parameters

bEnable
[in] TRUE to enable accessibility support; FALSE to disable accessibility support. The default value is TRUE.

Remarks

Active Accessibility is a COM-based technology that improves the way programs and the Windows operating system work together with assistive technology products. It provides reliable methods for exposing information about user interface elements. However, a newer accessibility model called Microsoft UI Automation is now available. For a comparison of the two technologies, see UI Automation and Microsoft Active Accessibility.

Use the AFX_GLOBAL_DATA::IsAccessibilitySupport method to determine whether Microsoft Active Accessibility support is enabled.

AFX_GLOBAL_DATA::ExcludeTag

Removes the specified XML tag pair from a specified buffer.

BOOL ExcludeTag(
    CString& strBuffer,
    LPCTSTR lpszTag,
    CString& strTag,
    BOOL bIsCharsList = FALSE);

Parameters

strBuffer
[in] A buffer of text.

lpszTag
[in] The name of a pair of opening and closing XML tags.

strTag
[out] When this method returns, the strTag parameter contains the text that is between the opening and closing XML tags that are named by the lpszTag parameter. Any leading or trailing whitespace is trimmed from the result.

bIsCharsList
[in] TRUE to convert symbols for escape characters in the strTag parameter into actual escape characters; FALSE not to perform the conversion.The default value is FALSE. For more information, see Remarks.

Return Value

TRUE if this method is successful; otherwise, FALSE.

Remarks

An XML tag pair consists of named opening and closing tags that indicate the start and end of a run of text in the specified buffer. The strBuffer parameter specifies the buffer, and the lpszTag parameter specifies the name of the XML tags.

Use the symbols in the following table to encode a set of escape characters in the specified buffer. Specify TRUE for the bIsCharsList parameter to convert the symbols in the strTag parameter into actual escape characters. The following table uses the _T() macro to specify the symbol and escape character strings.

Symbol Escape character
_T("\\t") _T("\t")
_T("\\n") _T("\n")
_T("\\r") _T("\r")
_T("\\b") _T("\b")
_T("LT") _T("<")
_T("GT") _T(">")
_T("AMP") _T("&")

AFX_GLOBAL_DATA::GetColor

Retrieves the current color of the specified user interface element.

COLORREF GetColor(int nColor);

Parameters

nColor
[in] A value that specifies a user interface element whose color is retrieved. For a list of valid values, see the nIndex parameter of the GetSysColor method.

Return Value

The RGB color value of the specified user interface element. For more information, see Remarks.

Remarks

If the nColor parameter is out of range, the return value is zero. Because zero is also a valid RGB value, you cannot use this method to determine whether a system color is supported by the current operating system. Instead, use the GetSysColorBrush method, which returns NULL if the color is not supported.

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.

ID2D1Factory* GetDirect2dFactory();

Return Value

A pointer to ID2D1Factory interface if creation of a factory succeeds, or NULL if creation fails or current Operation System don't have D2D support.

AFX_GLOBAL_DATA::GetHandCursor

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

HCURSOR GetHandCursor();

Return Value

The handle of the hand cursor.

AFX_GLOBAL_DATA::GetNonClientMetrics

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

BOOL GetNonClientMetrics(NONCLIENTMETRICS& info);

Parameters

info
[in, out] A NONCLIENTMETRICS structure that contains the scalable metrics associated with the nonclient area of a nonminimized window.

Return Value

TRUE if this method succeeds; otherwise, FALSE.

AFX_GLOBAL_DATA::GetTextHeight

Retrieves the height of text characters in the current font.

int GetTextHeight(BOOL bHorz = TRUE);

Parameters

bHorz
[in] TRUE to retrieve the height of characters when text runs horizontally; FALSE to retrieve the height of characters when text runs vertically. The default value is TRUE.

Return Value

The height of the current font, which is measured from its ascender to its descender.

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.

IWICImagingFactory* GetWICFactory();

Return Value

A pointer to IWICImagingFactory interface if creation of a factory succeeds, or NULL if creation fails or current Operation System don't have WIC support.

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.

IDWriteFactory* GetWriteFactory();

Return Value

A pointer to IDWriteFactory interface if creation of a factory succeeds, or NULL if creation fails or current Operation System don't have DirectWrite support.

AFX_GLOBAL_DATA::InitD2D

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

BOOL InitD2D(
    D2D1_FACTORY_TYPE d2dFactoryType = D2D1_FACTORY_TYPE_SINGLE_THREADED,
    DWRITE_FACTORY_TYPE writeFactoryType = DWRITE_FACTORY_TYPE_SHARED);

Parameters

d2dFactoryType
The threading model of the D2D factory and the resources it creates.

writeFactoryType
A value that specifies whether the write factory object will be shared or isolated

Return Value

Returns TRUE if the factories were intilalizrd, FALSE - otherwise

AFX_GLOBAL_DATA::Is32BitIcons

Indicates whether predefined 32-bit icons are supported.

BOOL Is32BitIcons() const;

Return Value

TRUE if predefined 32-bit icons are supported; otherwise, FALSE.

Remarks

This method returns TRUE if the framework supports 32-bit built-in icons, and if the operating system supports 16 bits per pixel or more, and if images are not displayed in high contrast.

AFX_GLOBAL_DATA::IsAccessibilitySupport

Indicates whether Microsoft Active Accessibility support is enabled.

BOOL IsAccessibilitySupport() const;

Return Value

TRUE if accessibility support is enabled; otherwise, FALSE.

Remarks

Microsoft Active Accessibility was the earlier solution for making applications accessible. Microsoft UI Automation is the new accessibility model for Microsoft Windows and is intended to address the needs of assistive technology products and automated testing tools.

Use the AFX_GLOBAL_DATA::EnableAccessibilitySupport method to enable or disable Active Accessibility support.

AFX_GLOBAL_DATA::IsD2DInitialized

Determines whether the D2D was initialized

BOOL IsD2DInitialized() const;

Return Value

TRUE if D2D was initialized; otherwise FALSE.

AFX_GLOBAL_DATA::IsDwmCompositionEnabled

Provides a simple way to call the Windows DwmIsCompositionEnabled method.

BOOL IsDwmCompositionEnabled();

Return Value

TRUE if Desktop Window Manager (DWM) composition is enabled; otherwise, FALSE.

AFX_GLOBAL_DATA::IsHighContrastMode

Indicates whether images are currently displayed in high contrast.

BOOL IsHighContrastMode() const;

Return Value

TRUE if images are currently displayed in black or white high contrast mode; otherwise, FALSE.

Remarks

In black high contrast mode, edges facing the light are white and the background is black. In white high contrast mode, edges facing the light are black and the background is white.

AFX_GLOBAL_DATA::IsWindowsLayerSupportAvailable

Indicates whether the operating system supports layered windows.

BOOL IsWindowsLayerSupportAvailable() const;

Return Value

TRUE if layered windows are supported; otherwise, FALSE.

Remarks

If layered windows are supported, smart docking markers use layered windows.

AFX_GLOBAL_DATA::m_bUseBuiltIn32BitIcons

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

BOOL  m_bUseBuiltIn32BitIcons;

Remarks

TRUE specifies that the framework use 32-bit color icons; FALSE specifies lower resolution icons. The AFX_GLOBAL_DATA::AFX_GLOBAL_DATA constructor initializes this member to TRUE.

This member must be set at application startup.

AFX_GLOBAL_DATA::m_bUseSystemFont

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

BOOL m_bUseSystemFont;

Remarks

TRUE specifies to use a system font; otherwise, FALSE. The AFX_GLOBAL_DATA::AFX_GLOBAL_DATA constructor initializes this member to FALSE.

Testing this member is not the only way for the framework to determine the font to use. The AFX_GLOBAL_DATA::UpdateFonts method also tests default and alternative fonts to determine what visual styles are available to be applied to menus, toolbars, and ribbons.

AFX_GLOBAL_DATA::m_hcurHand

Stores the handle for the hand cursor.

HCURSOR m_hcurHand;

AFX_GLOBAL_DATA::m_hcurStretch

Stores the handle for the horizontal stretch cursor.

HCURSOR m_hcurStretch;

AFX_GLOBAL_DATA::m_hcurStretchVert

Stores the handle for the vertical stretch cursor.

HCURSOR m_hcurStretchVert;

AFX_GLOBAL_DATA::m_hiconTool

Stores the handle for the tool icon.

HICON m_hiconTool;

AFX_GLOBAL_DATA::m_nAutoHideToolBarMargin

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

int  m_nAutoHideToolBarMargin;

Remarks

The AFX_GLOBAL_DATA::AFX_GLOBAL_DATA constructor initializes this member to 4 pixels.

AFX_GLOBAL_DATA::m_nAutoHideToolBarSpacing

Specifies the gap between autohide toolbars.

int   m_nAutoHideToolBarSpacing;

Remarks

The AFX_GLOBAL_DATA::AFX_GLOBAL_DATA constructor initializes this member to 14 pixels.

AFX_GLOBAL_DATA::m_nDragFrameThicknessDock

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

int  m_nDragFrameThicknessDock;

Remarks

The AFX_GLOBAL_DATA::AFX_GLOBAL_DATA constructor initializes this member to 3 pixels.

AFX_GLOBAL_DATA::m_nDragFrameThicknessFloat

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

int  m_nDragFrameThicknessFloat;

Remarks

The AFX_GLOBAL_DATA::AFX_GLOBAL_DATA constructor initializes this member to 4 pixels.

AFX_GLOBAL_DATA::OnSettingChange

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

void OnSettingChange();

Remarks

This method sets framework variables to the state of certain attributes of the user's desktop. This method detects the current state of the menu animation, menu fade, and task bar autohide features.

AFX_GLOBAL_DATA::RegisterWindowClass

Registers the specified MFC window class.

CString RegisterWindowClass(LPCTSTR lpszClassNamePrefix);

Parameters

lpszClassNamePrefix
[in] The name of the window class to register.

Return Value

The qualified name of the registered class if this method succeeds; otherwise, a resource exception.

Remarks

The return value is a colon-delimited list of the lpszClassNamePrefix parameter string, and the hexadecimal text representations of the handles of the current application instance; the application cursor, which is the arrow cursor whose identifier is IDC_ARROW; and the background brush. For more information about registering MFC window classes, see AfxRegisterClass.

AFX_GLOBAL_DATA::Resume

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

BOOL Resume();

Return Value

TRUE if this method succeeds; otherwise, FALSE. In debug mode, this method asserts if this method is unsuccessful.

Remarks

This method is called when the framework receives the WM_POWERBROADCAST message.

AFX_GLOBAL_DATA::SetLayeredAttrib

Provides a simple way to call the Windows SetLayeredWindowAttributes method.

BOOL SetLayeredAttrib(
    HWND hwnd,
    COLORREF crKey,
    BYTE bAlpha,
    DWORD dwFlags);

Parameters

hwnd
[in] Handle to the layered window.

crKey
[in] The transparency color key that the Desktop Window Manager uses to compose the layered window.

bAlpha
[in] The alpha value that is used to describe the opacity of the layered window.

dwFlags
[in] A bitwise combination (OR) of flags that specify which method parameters to use. Specify LWA_COLORKEY to use the crKey parameter as the transparency color. Specify LWA_ALPHA to use the bAlpha parameter to determine the opacity of the layered window.

Return Value

TRUE if this method succeeds; otherwise, FALSE.

AFX_GLOBAL_DATA::SetMenuFont

Creates the specified logical font.

BOOL SetMenuFont(
    LPLOGFONT lpLogFont,
    BOOL bHorz);

Parameters

lpLogFont
[in] Pointer to a structure that contains the attributes of a font.

bHorz
[in] TRUE to specify that the text runs horizontally; FALSE to specify that the text runs vertically.

Return Value

TRUE if this method succeeds; otherwise, FALSE. In debug mode, this method asserts if this method is unsuccessful.

Remarks

This method creates a horizontal regular font, an underlined font, and a bold font that is used in default menu items. This method optionally creates a regular vertical font. For more information about logical fonts, see CFont::CreateFontIndirect.

AFX_GLOBAL_DATA::UpdateFonts

Reintializes the logical fonts that are used by the framework.

void UpdateFonts();

Remarks

For more information about logical fonts, see CFont::CreateFontIndirect.

AFX_GLOBAL_DATA::UpdateSysColors

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

void UpdateSysColors();

AFX_GLOBAL_DATA::bIsWindows7

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

BOOL bIsWindows7;

AFX_GLOBAL_DATA::clrActiveCaptionGradient

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

COLORREF clrActiveCaptionGradient;

AFX_GLOBAL_DATA::clrInactiveCaptionGradient

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

COLORREF clrInactiveCaptionGradient;

AFX_GLOBAL_DATA::GetITaskbarList

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

ITaskbarList *GetITaskbarList();

Return Value

A pointer to the ITaskbarList interface if creation of a task bar list object succeeds; NULL if creation fails or if the current Operation System is less than Windows 7.

AFX_GLOBAL_DATA::GetITaskbarList3

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

ITaskbarList3 *GetITaskbarList3();

Return Value

A pointer to the ITaskbarList3 interface if creation of a task bar list object succeeds; NULL if creation fails or if the current Operation System is less than Windows 7.

AFX_GLOBAL_DATA::GetShellAutohideBars

Determines positions of Shell auto hide bars.

int GetShellAutohideBars();

Return Value

An integer value with encoded flags that specify positions of auto hide bars. It may combine the following values: AFX_AUTOHIDE_BOTTOM, AFX_AUTOHIDE_TOP, AFX_AUTOHIDE_LEFT, AFX_AUTOHIDE_RIGHT.

AFX_GLOBAL_DATA::ReleaseTaskBarRefs

Releases interfaces obtained through the GetITaskbarList and GetITaskbarList3 methods.

void ReleaseTaskBarRefs();

AFX_GLOBAL_DATA::ShellCreateItemFromParsingName

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

HRESULT ShellCreateItemFromParsingName(
    PCWSTR pszPath,
    IBindCtx *pbc,
    REFIID riid,
    void **ppv);

Parameters

pszPath
[in] A pointer to a display name.

pbc
A pointer to a bind context that controls the parsing operation.

riid
A reference to an interface ID.

ppv
[out] When this function returns, contains the interface pointer requested in riid. This will typically be IShellItem or IShellItem2.

Return Value

Returns S_OK if successful; an error value otherwise.

See also

Hierarchy Chart
Structures, Styles, Callbacks, and Message Maps
COLORREF
Parts and States
CDC::DrawText
DrawThemeTextEx
Desktop Window Manager
Enable and Control DWM Composition
UI Automation and Microsoft Active Accessibility
GetSysColor Function
GetSysColorBrush
NONCLIENTMETRICS Structure
AfxRegisterClass
AfxThrowResourceException
SetLayeredWindowAttributes