Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
WinLockVisRegions (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_WINWINDOWMGR
BOOL WinLockVisRegions(hwndDesktop, fLock)
HWND hwndDesktop; /* handle of the desktop */
BOOL fLock; /* lock/unlock flag */
The WinLockVisRegions function locks or unlocks the visible regions of all
windows on the screen, preventing any of the visible regions from changing.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hwndDesktop Identifies the desktop window. This parameter can be
HWND_DESKTOP or the desktop window handle.
fLock Specifies whether to lock or unlock the visible regions. If
TRUE, the visible regions are locked. If FALSE, the visible
regions are unlocked.
Comments
This function is used to prevent a window's visible regions from changing
while a thread performs a screen operation. For example, WinLockVisRegions
should be used if the application is moving bits from one part of a window
to another. Calling WinLockVisRegions during this operation ensures that no
other window will appear on top of the window that bits are being copied
from and therefore no physical change in the bits will take place. Using
WinLockWindowUpdate for this bit copying will not work, because although no
bits will changed in the locked area, it is still possible that the visible
region of the presentation space being used for the bit copying might
change.
While the visible regions are locked, no messages should be sent and no
functions called that could send messages.
Only one thread can lock the visible regions at any one time. The same
thread can call WinLockVisRegions multiple times. A lock count is maintained
by the system and is incremented each time a locking call is made and
decremented each time an unlocking call is made. The visible regions are
unlocked when the count is zero.
If WinLockVisRegions is called while another thread has locked the visible
regions, the function will not return until the thread locking the visible
regions has unlocked them.
Return Value
The return value is TRUE if the function is successful or FALSE if an error
occurs.
See Also
WinLockWindowUpdate
♦