DwmGetWindowAttribute function

Retrieves the current value of a specified attribute applied to a window.

Syntax

DWMAPI DwmGetWindowAttribute(
  HWND  hwnd,
  DWORD dwAttribute,
  PVOID pvAttribute,
  DWORD cbAttribute
);

Parameters

hwnd

The handle to the window from which the attribute data is retrieved.

dwAttribute

The attribute to retrieve, specified as a DWMWINDOWATTRIBUTE value.

pvAttribute

A pointer to a value that, when this function returns successfully, receives the current value of the attribute. The type of the retrieved value depends on the value of the dwAttribute parameter.

cbAttribute

The size of the DWMWINDOWATTRIBUTE value being retrieved. The size is dependent on the type of the pvAttribute parameter.

Return Value

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

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Target Platform Windows
Header dwmapi.h
Library Dwmapi.lib
DLL Dwmapi.dll

See Also

DwmSetWindowAttribute

Enable and Control DWM Composition