CloseThemeData function

Closes the theme data handle.

Syntax

THEMEAPI CloseThemeData(
  HTHEME hTheme
);

Parameters

hTheme

Type: HTHEME

Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.

Return Value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The CloseThemeData function should be called when a window that has a visual style applied is destroyed. This function should also be called whenever a window receives a WM_THEMECHANGED message. This call should be followed by an attempt to create a new theme data handle if a call to the IsThemeActive function returns TRUE.

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

See Also

OpenThemeData