ValidateRect

Syntax

void ValidateRect(hWnd,lpRect)

This function validates the client area within the given rectangle by removing the rectangle from the update region of the given window. If the lpRect parameter is NULL, the entire window is validated.

Parameter Type/Description  

hWnd HWND Identifies the window whose update region is to be modified.  
lpRect LPRECT Points to a RECT data structure that contains the rectangle (in client coordinates) to be removed from the update region.  

Return Value

None.

Comments

The BeginPaint function automatically validates the entire client area. Neither the
ValidateRect
nor ValidateRgn function should be called if a portion of the update
region needs to be validated before the next WM_PAINT message is generated.

Windows continues to generate WM_PAINT messages until the current update region is validated.