SetWindowThemeAttribute function (uxtheme.h)

Sets attributes to control how visual styles are applied to a specified window.

Syntax

HRESULT SetWindowThemeAttribute(
  [in] HWND                     hwnd,
  [in] WINDOWTHEMEATTRIBUTETYPE eAttribute,
  [in] PVOID                    pvAttribute,
  [in] DWORD                    cbAttribute
);

Parameters

[in] hwnd

Type: HWND

Handle to a window to apply changes to.

[in] eAttribute

Type: enum WINDOWTHEMEATTRIBUTETYPE

Value of type WINDOWTHEMEATTRIBUTETYPE that specifies the type of attribute to set. The value of this parameter determines the type of data that should be passed in the pvAttribute parameter. Can be the following value.

Value Meaning
WTA_NONCLIENT
Specifies non-client related attributes. pvAttribute must be a pointer of type WTA_OPTIONS.

[in] pvAttribute

Type: PVOID

A pointer that specifies attributes to set. Type is determined by the value of the eAttribute value.

[in] cbAttribute

Type: DWORD

Specifies the size, in bytes, of the data pointed to by pvAttribute.

Return value

Type: HRESULT

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

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header uxtheme.h
Library UxTheme.lib
DLL UxTheme.dll

See also

WINDOWTHEMEATTRIBUTETYPE