CWindow::GetWindowDC

检索整个窗口的设备上下文。

HDC GetWindowDC() throw();

备注

在参见 Windows SDK的 GetWindowDC

示例

//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();

要求

Header: atlwin.h

请参见

参考

CWindow选件类

CWindow::GetDC

CWindow::GetDCEx

CWindow::ReleaseDC