GetDCEx function Null safety user32

int GetDCEx(
  1. int hWnd,
  2. int hrgnClip,
  3. int flags
)

The GetDCEx function retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen. You can use the returned handle in subsequent GDI functions to draw in the DC. The device context is an opaque data structure, whose values are used internally by GDI.

HDC GetDCEx(
  HWND  hWnd,
  HRGN  hrgnClip,
  DWORD flags
);

Implementation

int GetDCEx(int hWnd, int hrgnClip, int flags) {
  final _GetDCEx = _user32.lookupFunction<
      IntPtr Function(IntPtr hWnd, IntPtr hrgnClip, Uint32 flags),
      int Function(int hWnd, int hrgnClip, int flags)>('GetDCEx');
  return _GetDCEx(hWnd, hrgnClip, flags);
}