ReleaseDC function user32

int ReleaseDC(
  1. HWND? hWnd,
  2. HDC hDC
)

Releases a device context (DC), freeing it for use by other applications.

The effect of the ReleaseDC function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs.

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

Implementation

@pragma('vm:prefer-inline')
int ReleaseDC(HWND? hWnd, HDC hDC) => _ReleaseDC(hWnd ?? nullptr, hDC);