Citation:
InvalidateRect
This function adds a rectangle to the specified window’s update region. The update region represents the portion of the window’s client area that must be redrawn.
BOOL InvalidateRect(
HWND hWnd,
const RECT *lpRect,
BOOL bErase
);
Parameters
hWnd
Handle to the window whose update region has changed. If this parameter is NULL, the system invalidates and redraws all windows, and sends the WM_ERASEBKGND message to the window procedure before the function returns.
lpRect
Long pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region.
bErase
Boolean that 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 this parameter is FALSE, the background remains unchanged.