CWnd::InvalidateRect

Call this member function to invalidate 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.

Syntax

void InvalidateRect ( LPCRECT lpRect, BOOL bErase = TRUE );

At a Glance

Header File Afxwin.h
Platforms
Versions 1.0 and later
Complete documentation Visual C++ documentation

Remarks

In Windows CE, you have to pass a valid RECT pointer in the lpRect parameter. Windows 95 and Windows NT invalidate and redraw the entire window if the lpRect parameter is set to NULL. This is not supported in Windows CE.

See Also

CWnd Overview, CWnd Member Functions, Window Class Categories, CWnd::BeginPaint, CWnd::ValidateRect, RECT, WM_PAINT