BOOL ValidateRect(hwnd, lprc) | |||||
HWND hwnd; | /* handle of window | */ | |||
CONST RECT *lprc; | /* address of structure with validation rect. | */ |
This function validates the client area within the given rectangle by removing the rectangle from the update region of the given window. If the lprc parameter is NULL, the entire window is validated.
hwnd
Identifies the window whose update region is to be modified.
lprc
Points to a RECT structure that contains the rectangle (in client coordinates) to be removed from the update region.
Returns TRUE for success, FALSE for failure.
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.
BeginPaint, ValidateRgn, InvalidateRect, InvalidateRgn