BOOL RedrawWindow(hwnd, lprcUpdate, hrgnUpdate, afuRedraw) | |||||
HWND hwnd; | /* handle of the window | */ | |||
CONST RECT *lprcUpdate; | /* address of structure with update rectangle | */ | |||
HRGN hrgnUpdate; | /* handle of the update region | */ | |||
UINT afuRedraw; | /* array of redraw flags | */ |
The RedrawWindow function updates the specified rectangle or region in a window's client area.
hwnd
Identifies the window to be redrawn. If this parameter is NULL, the entire screen is updated.
lprcUpdate
Points to a RECT structure that contains the coordinates of the update rectangle. This parameter is ignored if the hrgnUpdate parameter specifies a valid region handle. The RECT structure has the following form:
typedef struct tagRECT { /* rc */
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT;
hrgnUpdate
Identifies the update region. If both the hrgnUpdate and lprcUpdate parameters are NULL, the entire client area is added to the update region.
afuRedraw
Specifies one or more redraw flags. This parameter can be a combination of the following flags:
Value | Meaning |
RDW_ALLCHILDREN | ||
Includes the child windows, if any, in the repainting operation. | ||
RDW_ERASE | ||
Causes the window to receive a WM_ERASEBKGND message when the window is repainted. | ||
RDW_ERASENOW | ||
Causes the window to receive a WM_ERASEBKGND message before the RedrawWindow function returns. | ||
RDW_INVALIDATE | ||
Adds the rectangle or region to the window's update region. | ||
RDW_NOCHILDREN | ||
Excludes the child windows, if any, from the repainting operation. | ||
RDW_NOERASE | ||
Prevents the window from receiving a WM_ERASEBKGND message when the window is repainted. | ||
RDW_UPDATENOW | ||
Causes the window to receive a WM_PAINT or WM_PAINTICON message before the function returns. | ||
RDW_VALIDATE | ||
Removes the rectangle or region from the window's update region. |
The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.
GetUpdateRect, GetUpdateRgn, InvalidateRect, InvalidateRgn, UpdateWindow