ReleaseDC
ReleaseDC is a Windows API function that releases a device context (DC) previously obtained with GetDC or GetWindowDC. It is used to return the DC to the system when drawing to a window or the screen is finished, so that GDI resources can be reused.
The function prototype is int ReleaseDC(HWND hWnd, HDC hDC). The hWnd parameter should be the window associated
The return value indicates success or failure: a nonzero value indicates success, while zero indicates failure.
Important caveat: DCs obtained through BeginPaint during WM_PAINT processing should not be released with ReleaseDC; they
Related functions include GetDC, GetWindowDC, EndPaint, and BeginPaint. In typical usage, code obtains a DC for