GetLayeredWindowAttributes function user32

Win32Result<bool> GetLayeredWindowAttributes(
  1. HWND hwnd,
  2. Pointer<Uint32>? pcrKey,
  3. Pointer<Uint8>? pbAlpha,
  4. Pointer<Uint32>? pdwFlags,
)

Retrieves the opacity and transparency color key of a layered window.

To learn more, see learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getlayeredwindowattributes.

Implementation

Win32Result<bool> GetLayeredWindowAttributes(
  HWND hwnd,
  Pointer<Uint32>? pcrKey,
  Pointer<Uint8>? pbAlpha,
  Pointer<Uint32>? pdwFlags,
) {
  final result_ = GetLayeredWindowAttributes_Wrapper(
    hwnd,
    pcrKey ?? nullptr,
    pbAlpha ?? nullptr,
    pdwFlags ?? nullptr,
  );
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}