Microsoft Windows CE 3.0  

ValidateRect

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function validates the client area within a rectangle by removing the rectangle from the update region of the specified window.

BOOL
ValidateRect( HWND
hWnd
, const
RECT
*
lpRect
);

Parameters

hWnd
Handle to the window whose update region is to be modified. If this parameter is NULL, the system invalidates and redraws all windows and sends the WM_ERASEBKGNDmessage to the window procedure before the function returns.
lpRect
Long pointer to a RECTstructure that contains the client coordinates of the rectangle to be removed from the update region. If this parameter is NULL, the entire client area is removed.

Return Values

Nonzero indicates success. Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

Passing in a NULL value for the hWndparameter is not supported.

The BeginPaintfunction automatically validates the entire client area. Neither the ValidateRectnor ValidateRgnfunction should be called if a portion of the update region must be validated before the next WM_PAINTmessage is generated.

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

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h   Coredll.lib, Winmgr.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

BeginPaint, GetLastError, InvalidateRect, WM_ERASEBKGND, WM_PAINT, RECT