DeferWindowPos function user32

Win32Result<HDWP> DeferWindowPos(
  1. HDWP hWinPosInfo,
  2. HWND hWnd,
  3. HWND? hWndInsertAfter,
  4. int x,
  5. int y,
  6. int cx,
  7. int cy,
  8. SET_WINDOW_POS_FLAGS uFlags,
)

Updates the specified multiple-window — position structure for the specified window.

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

Implementation

Win32Result<HDWP> DeferWindowPos(
  HDWP hWinPosInfo,
  HWND hWnd,
  HWND? hWndInsertAfter,
  int x,
  int y,
  int cx,
  int cy,
  SET_WINDOW_POS_FLAGS uFlags,
) {
  final result_ = DeferWindowPos_Wrapper(
    hWinPosInfo,
    hWnd,
    hWndInsertAfter ?? nullptr,
    x,
    y,
    cx,
    cy,
    uFlags,
  );
  return .new(value: .new(result_.value.ptr), error: result_.error);
}