SetWindowPos function Null safety user32

int SetWindowPos (
  1. int hWnd,
  2. int hWndInsertAfter,
  3. int X,
  4. int Y,
  5. int cx,
  6. int cy,
  7. int uFlags
)

Changes the size, position, and Z order of a child, pop-up, or top-level window. These windows are ordered according to their appearance on the screen. The topmost window receives the highest rank and is the first window in the Z order.

BOOL SetWindowPos(
  HWND hWnd,
  HWND hWndInsertAfter,
  int  X,
  int  Y,
  int  cx,
  int  cy,
  UINT uFlags
);

Implementation

int SetWindowPos(
    int hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags) {
  final _SetWindowPos = _user32.lookupFunction<
      Int32 Function(IntPtr hWnd, IntPtr hWndInsertAfter, Int32 X, Int32 Y,
          Int32 cx, Int32 cy, Uint32 uFlags),
      int Function(int hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy,
          int uFlags)>('SetWindowPos');
  return _SetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags);
}