We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Releases a device context, freeing it for use by other applications.

int ReleaseDC( 
   CDC* pDC  


Identifies the device context to be released.

Nonzero if successful; otherwise 0.

The effect of the ReleaseDC member function depends on the device-context type.

The application must call the ReleaseDC member function for each call to the GetWindowDC member function and for each call to the GetDC member function.

Header: afxwin.h