The DeleteDC function deletes the specified device context (DC).
BOOL DeleteDC(
HDC hdc // handle to device context
);
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Windows NT: To get extended error information, call GetLastError.
An application must not delete a device context whose handle was obtained by calling the GetDC function. Instead, it must call the ReleaseDC function to free the device context.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in wingdi.h.
Import Library: Use gdi32.lib.
Device Contexts Overview, Device Context Functions, CreateDC, GetDC, ReleaseDC