CWindow::ReleaseDC

int ReleaseDC( HDC hDC );

See ReleaseDC in the Win32 SDK.

Remarks

Releases a device context.

Example

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::ReleaseDC() to release the DC

CWindow myWindow;
myWindow.Attach(hWndFoo);
HDC hDC = myWindow.GetDC();
//Use the DC
...
...
...
myWindow.ReleaseDC(hDC);
hDC = NULL;

CWindow OverviewClass Members

See Also   CWindow::GetDC, CWindow::GetDCEx, CWindow::GetWindowDC