Jump to content

WinSetVisibleRegionNotify

From EDM2
Revision as of 18:41, 9 April 2025 by Martini (talk | contribs) (Created page with "This function allows an application to request that a given window receive notifications every time that its visible region gets altered. ==Syntax== WinSetVisibleRegionNotify(hwnd, fEnable) ==Parameters== ;hwnd (HWND) - Input : The window handle. ;fEnable (BOOL) - Input : Enable flag. :;TRUE: The specified window wants to receive notifications every time its visible region is modified. :;FALSE: The specified window no longer wants to receive any notification m...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function allows an application to request that a given window receive notifications every time that its visible region gets altered.

Syntax

WinSetVisibleRegionNotify(hwnd, fEnable)

Parameters

hwnd (HWND) - Input
The window handle.
fEnable (BOOL) - Input
Enable flag.
TRUE
The specified window wants to receive notifications every time its visible region is modified.
FALSE
The specified window no longer wants to receive any notification messages concerning its visible region.

Returns

fSuccess (BOOL) - returns
TRUE Successful completion
FALSE Error occurred.

Remarks

This call causes a notification message to be sent to the specified window every time its visible area is modified on the screen. In addition, the window is notified when an application issues a WinLockWindowUpdate call that affects it, so that any asynchronous drawing activity can be suspended.

Applications that blit to the screen memory directly can use the notification messages WM_VRNENABLED and WM_VRNDISABLED to determine when to suspend blitting and also to determine when the clipping areas for the visible region have been modified.

Use WinQueryVisibleRegion to obtain the current visible region when a window is notified that its visible region has changed.

Example Code

#define INCL_WINMESSAGEMGR /* Or use INCL_WIN, INCL_PM, */
#include <os2.h>

HWND    hwnd;      /*  The window handle. */
BOOL    fEnable;   /*  Enable flag. */
BOOL    fSuccess; /*  Success indicator. */

fSuccess = WinSetVisibleRegionNotify(hwnd,
             fEnable);

Related Functions