Export (0) Print
Expand All
Expand Minimize

InvalidateRgn (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function invalidates the client area within the specified region by adding the area to the current update region of a window.

InvalidateRgn also marks the invalidated region, along with all other areas in the update region, for painting when the next WM_PAINT message occurs.

BOOL WINAPI InvalidateRgn(
  HWND hWnd,
  HRGN hRgn,
  BOOL fErase
);

Parameters

hWnd
[in] Handle to the window that contains an update region that you want to modify.
hRgn
[in] Handle to the region that you want to add to the update region.

InvalidateRgn assumes that the region has client coordinates.

Set this parameter to NULL to add the entire client area to the update region.

fErase
[in] Boolean that specifies whether you want the background within the update region to be erased when the update region is processed.

TRUE indicates that the background is erased when the BeginPaint function is called.

FALSE indicates that the background remains unchanged.

Return Values

The return value is always nonzero.

Remarks

Invalidated areas accumulate in the update region until the application processes the next WM_PAINT message or until the application validates the region by calling the ValidateRect or ValidateRgn function.

The system sends a WM_PAINT message to a window whenever the update region for the application is not empty and the application queue for that window contains no messages.

You must create the specified region by using one of the region functions, such as ExtCreateRegion.

If the fErase parameter is TRUE for any part of the update region, the background in the entire region is erased, not just the background in the specified part.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

BeginPaint | ExtCreateRegion | InvalidateRect | ValidateRect | ValidateRgn | WM_PAINT


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft