CWindow::GetDC

Ruft einen Gerätekontext für den Clientbereich ab.

HDC GetDC( ) throw();

Hinweise

Siehe GetDC in Windows SDK.

Beispiel

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

Anforderungen

Header: atlwin.h

Siehe auch

Referenz

CWindow-Klasse

CWindow::GetDCEx

CWindow::GetWindowDC

CWindow::ReleaseDC