Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CWnd::BeginPaint
◄CWnd►                                        ◄Up► ◄Contents► ◄Index► ◄Back►
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  CDC* BeginPaint( LPPAINTSTRUCT lpPaint );
 
  Parameter   Description
 
  <lpPaint>   Points to the ◄PAINTSTRUCT► structure that is to receive
              painting information.
 
  Remarks
 
  Prepares CWnd for painting and fills a ◄PAINTSTRUCT► data structure with
  information about the painting.
 
  The paint structure contains a ◄RECT► data structure that has the
  smallest rectangle that completely encloses the update region, and a
  flag that specifies whether the background has been erased.
 
  The update region is set by the ◄Invalidate►, ◄InvalidateRect►, or
  ◄InvalidateRgn► member functions and by the system after sizing, moving,
  creating, scrolling, or any other operation that affects the client
  area. If the update region is marked for erasing, BeginPaint sends an
  ◄WM_ONERASEBKGND► message.
 
  Do not call the BeginPaint member function except in response to a
  ◄WM_PAINT► message. Each call to the BeginPaint member function must
  have a matching call to the ◄EndPaint► member function. If the caret is
  in the area to be painted, the BeginPaint member function automatically
  hides the caret to prevent it from being erased.
 
  Return Value
 
  Identifies the device context for CWnd. The pointer may be temporary,
  and should not be stored beyond the scope of EndPaint.
 
  See Also
 
  ◄CWnd::EndPaint►, ◄CWnd::Invalidate►, ◄CWnd::InvalidateRgn►,
  ◄::BeginPaint►, ◄CPaintDC►
 
 
                                     -♦-