다음을 통해 공유


CWindow::GetDC

클라이언트 영역에 대 한 장치 컨텍스트를 검색합니다.

HDC GetDC( ) throw();

설명

See GetDC in the Windows SDK.

예제

// The following example attaches a HWND to the CWindow object,
// calls CWindow::GetDC to retrieve the DC of the client
// area of the window wrapped by CWindow Object, and calls
// CWindow::ReleaseDC to release the DC. 

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

// Use the DC

myWindow.ReleaseDC(hDC);
hDC = NULL;

요구 사항

헤더: atlwin.h

참고 항목

참조

CWindow 클래스

CWindow::GetDCEx

CWindow::GetWindowDC

CWindow::ReleaseDC