DeleteDC
DeleteDC is a Windows API function in the Graphics Device Interface (GDI) used to delete a device context (DC) that was created by the application. The function signature is BOOL DeleteDC(HDC hdc). It frees the resources associated with the specified DC and invalidates the handle.
DeleteDC should be used to delete DCs created by CreateDC, CreateCompatibleDC, or other functions that allocate
If the function succeeds, a nonzero value is returned. If it fails, zero is returned. For extended
DeleteDC releases system resources associated with the DC. After deletion, the HDC handle becomes invalid for
CreateDC, CreateCompatibleDC, DeleteObject, ReleaseDC, SelectObject, GetDC, GetLastError.