WM_SETREDRAW

2.x

WM_SETREDRAW
wParam = (WPARAM) fRedraw;   /* state of redraw flag   */
lParam = 0L;                 /* not used, must be zero */

An application sends a WM_SETREDRAW message to a window to allow changes in that window to be redrawn or to prevent changes in that window from being redrawn.

Parameters

fRedraw

Value of wParam. Specifies the state of the redraw flag. If this parameter is nonzero, the redraw flag is set. If this parameter is zero, the flag is cleared.

Return Value

An application should return zero if it processes this message.

Comments

This message sets or clears the redraw flag. If the redraw flag is cleared, the contents of the specified window will not be updated after each change, and the window will not be repainted until the redraw flag is set. For example, an application that needs to add several items to a list box can clear the redraw flag, add the items, and then set the redraw flag. Finally, the application can call the InvalidateRect function to cause the list box to be repainted.