This function can be used to defer drawing when making a series of changes to a window. A window can be redrawn by using the WinShowWindow function.

WS_VISIBLE (style bit of a window) is set to fEnable without causing redrawing. That is, if the window was previously visible, it remains visible on the device when WS_VISIBLE is set to 0, and if the window was previously invisible, it is not shown when WS_VISIBLE is set to 1. If fEnable is set to TRUE, any subsequent drawing into the window is visible. If fEnable is set to FALSE, any subsequent drawing into the window is not visible.

If the value of the WS_VISIBLE style bit has been changed, the WM_SHOW message is sent to the window of hwnd before the call returns.

Any alteration to the appearance of a window disabled for window update is not presented. Therefore, the application must ensure that the window is redrawn. To show a window and ensure that it is redrawn after calling the WinEnableWindowUpdate function with fEnable set to FALSE, use the WinShowWindow function with fNewVisibility set to TRUE. In particular, if a window is destroyed while in this state its image is not removed from the display. After window updating is reenabled, the application should ensure that the window gets totally invalidated so that it repaints.


[Back] [Next]