GetWindowTheme function

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

Syntax

void GetWindowTheme(
  HWND hwnd
);

Parameters

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

   
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)