void InvalidateRgn(hwnd, hrgn, fErase) | |||||
HWND hwnd; | /* handle of window with changed update region | */ | |||
HRGN hrgn; | /* handle of region to add | */ | |||
BOOL fErase; | /* erase-background flag, */ |
The InvalidateRgn function adds a region to a window's update region. The update region represents the client area of the window that must be redrawn.
hwnd
Identifies the window whose update region has changed.
hrgn
Identifies the region to be added to the update region. The region is assumed to have client coordinates. If this parameter is NULL, the entire client area is added to the update region.
fErase
Specifies whether the background within the update region is to be erased when the update region is processed. If this parameter is TRUE, the background is erased when the BeginPaint function is called. If the parameter is FALSE, the background remains unchanged.
This function does not return a value.
The invalidated regions accumulate in the update region until the region is processed when the next WM_PAINT message occurs, or until the region is validated by using the ValidateRect or ValidateRgn function.
Windows sends a WM_PAINT message to a window whenever its update region is not empty and there are no other messages in the application queue for that window.
If the fErase parameter is TRUE for any part of the update region, the background is erased in the entire region, not just in the given part.