MonitorFromWindow function Null safety user32

int MonitorFromWindow(
  1. int hwnd,
  2. int dwFlags
)

The MonitorFromWindow function retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.

HMONITOR MonitorFromWindow(
  HWND  hwnd,
  DWORD dwFlags
);

Implementation

int MonitorFromWindow(int hwnd, int dwFlags) {
  final _MonitorFromWindow = _user32.lookupFunction<
      IntPtr Function(IntPtr hwnd, Uint32 dwFlags),
      int Function(int hwnd, int dwFlags)>('MonitorFromWindow');
  return _MonitorFromWindow(hwnd, dwFlags);
}