CWnd::InvalidateRect

This method invalidates the client area within the specified 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.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

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

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::BeginPaint, CWnd::ValidateRect, RECT, WM_PAINT