HDC BeginPaint( LPPAINTSTRUCT lpPaint );
See BeginPaint in the Win32 SDK.
Remarks
Prepares the window for painting.
Example
//The following example attaches an HWND to the CWindow object
//and calls CWindow::BeginPaint() in the WM_PAINT handler
//of a CWindowImpl-derived class
LRESULT OnPaint(UINT nMsg, WPARAM wParam,LPARAM lParam, BOOL& bHandled)
{
CWindow myWindow;
myWindow.Attach(m_hWnd);
PAINTSTRUCT ps;
HDC hDC = myWindow.BeginPaint(&ps);
//Use the hDC as much as you want
...
...
myWindow.EndPaint(&ps);
return 0L;
}
CWindow Overview | Class Members
See Also CWindow::EndPaint