The ReleaseDC function 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.
Handle to the window whose DC is to be released.
Handle to the DC to be released.
The return value indicates whether the DC was released. If the DC was released, the return value is true.
If the DC was not released, the return value is false.
The application must call the ReleaseDC function for each call to the see cref="GetWindowDC" /> function and for each call to the GetDC function that retrieves a common DC.
An application cannot use the ReleaseDC function to release a DC that was created by calling the see cref="Gdi.CreateDC" /> function; instead, it must use the see cref="Gdi.DeleteDC" /> function. ReleaseDC must be called from the same thread that called GetDC.
User Class | Tao.Platform.Windows Namespace | GetDC