This example uses WinLockVisRegions to prevent any window's visible region from changing while a screen operation is executing. WinLockVisRegions is called before the screen operation to lock the visible regions and again after the operation to unlock the regions.
#define INCL_WINWINDOWMGR /* Window Manager Functions */ #include <os2.h> BOOL fSuccess; /* success indicator */ /* lock visible regions */ fSuccess = WinLockVisRegions(HWND_DESKTOP, TRUE); /* . . executing screen operation . */ /* unlock visible regions */ fSuccess = WinLockVisRegions(HWND_DESKTOP, FALSE);