Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

InvalidateRgn

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

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
);
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.

The return value is always nonzero.

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.

Headerwindows.h
Librarycoredll.lib
Windows Embedded CEWindows CE .NET 4.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.