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::InvalidateRect
CWnd                                        Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  void InvalidateRect( LPRECT lpRect, BOOL bErase = FALSE );
 
  Parameter   Description
 
  <lpRect>    Points to a CRect or a RECT structure that contains the
              rectangle (in client coordinates) to be added to the update
              region. If <lpRect> is NULL, the entire client area is added
              to the region.
 
  <bErase>    Specifies whether the background within the update region is
              to be erased.
 
  Remarks
 
  Invalidates the client area within the given rectangle by adding that
  rectangle to the CWnd update region. The invalidated rectangle, along
  with all other areas in the update region, is marked for painting when
  the next WM_PAINT message is sent. The invalidated areas accumulate in
  the update region until the region is processed when the next WM_PAINT
  call occurs, or the region is validated by using the ValidateRect or
  ValidateRgn member function.
 
  The <bErase> parameter specifies whether the background within the
  update area is to be erased when the update region is processed. If
  <bErase> is TRUE, the background is erased when the BeginPaint member
  function is called; if <bErase> is FALSE, the background remains
  unchanged. If <bErase> is TRUE for any part of the update region, the
  background in the entire region is erased, not just in the given part.
 
  Windows sends WM_PAINT whenever the CWnd update region is not empty
  and there are no other messages in the application queue for that
  window.
 
  See Also
 
  CWnd::BeginPaint, CWnd::ValidateRect, CWnd::ValidateRgn,
  ::InvalidateRect
 
 
                                     -♦-