Share via


CWindow::GetWindowDC

Retrieves a device context for the entire window.

HDC GetWindowDC() throw();

Remarks

See GetWindowDC in the Windows SDK.

Example

//The following example attaches an HWND to the CWindow object and 
//calls CWindow::GetWindowDC() to retrieve the DC of the entire window

CWindow myWindow;
myWindow.Attach(hWnd);
HDC hDC = myWindow.GetWindowDC();

Requirements

Header: atlwin.h

See Also

Reference

CWindow Class

CWindow::GetDC

CWindow::GetDCEx

CWindow::ReleaseDC

Other Resources

CWindow Members