다음을 통해 공유


CWindow::EndPaint

페인트의 끝을 표시 합니다.

void EndPaint(
   LPPAINTSTRUCT lpPaint 
) throw();

설명

참조 EndPaint 에 있는 Windows SDK.

예제

//The following example attaches an HWND to the CWindow object
//and calls CWindow::BeginPaint() and CWindow::EndPaint() in the 
// WM_PAINT handler of a CWindowImpl-derived class
LRESULT CMyCtrl::OnPaint(UINT /*uMsg*/, 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
   ::Rectangle(hDC, 0, 0, 50, 50);

   myWindow.EndPaint(&ps);

   return 0;
}

요구 사항

헤더: atlwin.h

참고 항목

참조

CWindow 클래스

CWindow::BeginPaint