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.
A version of this page is also available for
4/8/2010

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

Syntax

BOOL WINAPI ValidateRgn(
  HWND 
hWnd,
  HRGN 
hRgn
);

Parameters

hWnd

[in] Handle to the window for which you want to modify the update region.

hRgn

[in] Handle to a region that defines the area that you want to remove from the update region.

Set this parameter to NULL to remove the entire client area.

Return Value

A nonzero value indicates success.

Zero indicates failure.

Remarks

You must create the specified region by calling a region function, such as ExtCreateRegion.

ValidateRgnassumes that the region coordinates are client coordinates.

The BeginPaintfunction validates the entire client area.

Do not call ValidateRector ValidateRgnif you require validation of a portion of the update region before the next WM_PAINTmessage is generated.

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also