DwmSetWindowAttribute function dwmapi

void DwmSetWindowAttribute(
  1. HWND hwnd,
  2. DWMWINDOWATTRIBUTE dwAttribute,
  3. Pointer<NativeType> pvAttribute,
  4. int cbAttribute,
)

Sets the value of Desktop Window Manager (DWM) non-client rendering attributes for a window.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute.

Implementation

@pragma('vm:prefer-inline')
void DwmSetWindowAttribute(
  HWND hwnd,
  DWMWINDOWATTRIBUTE dwAttribute,
  Pointer pvAttribute,
  int cbAttribute,
) {
  final hr$ = HRESULT(
    _DwmSetWindowAttribute(hwnd, dwAttribute, pvAttribute, cbAttribute),
  );
  if (hr$.isError) throw WindowsException(hr$);
}