GetWindowTheme function (uxtheme.h)

Retrieves a theme handle to a window that has visual styles applied.

Syntax

HTHEME GetWindowTheme(
  [in] HWND hwnd
);

Parameters

[in] hwnd

Type: HWND

Handle of the window.

Return value

Type: HTHEME

The most recent theme handle from OpenThemeData.

Remarks

If a window has a visual style applied, the GetWindowTheme function returns the most recent theme handle from OpenThemeData. If no visual style is applied, GetWindowTheme returns NULL.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header uxtheme.h
Library UxTheme.lib
DLL UxTheme.dll (version 1.0 or later)