SetWindowThemeAttribute function (uxtheme.h)

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

Syntax

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

Parameters

[in] hwnd

Type: HWND

Handle to a window to apply changes to.

eAttribute

[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