SetCapture function Null safety user32

int SetCapture (
  1. int hWnd

Sets the mouse capture to the specified window belonging to the current thread. SetCapture captures mouse input either when the mouse is over the capturing window, or when the mouse button was pressed while the mouse was over the capturing window and the button is still down. Only one window at a time can capture the mouse.

HWND SetCapture(
  HWND hWnd


int SetCapture(int hWnd) {
  final _SetCapture = _user32.lookupFunction<IntPtr Function(IntPtr hWnd),
      int Function(int hWnd)>('SetCapture');
  return _SetCapture(hWnd);