int ReleaseDC(hwnd, hdc) | |||||
HWND hwnd; | /* handle of window with device context | */ | |||
HDC hdc; | /* handle of device context | */ |
This function releases a device context, freeing it for use by other applications. The effect of the ReleaseDC function depends on the device-context type. It only frees common and window device contexts. It has no effect on class or private device contexts.
hwnd
Identifies the window whose device context is to be released.
hdc
Identifies the device context to be released.
The return value specifies whether the device context is released. It is 1 if the device context is released. Otherwise, it is zero.
The application must call the ReleaseDC function for each call to the GetWindowDC function and for each call to the GetDC function that retrieves a common device context.
GetDC, GetWindowDC