SetWindowDisplayAffinity function user32

Win32Result<bool> SetWindowDisplayAffinity(
  1. HWND hWnd,
  2. WINDOW_DISPLAY_AFFINITY dwAffinity
)

Stores the display affinity setting in kernel mode on the hWnd associated with the window.

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

Implementation

Win32Result<bool> SetWindowDisplayAffinity(
  HWND hWnd,
  WINDOW_DISPLAY_AFFINITY dwAffinity,
) {
  final result_ = SetWindowDisplayAffinity_Wrapper(hWnd, dwAffinity);
  return .new(value: result_.value.i32 != FALSE, error: result_.error);
}