win12.hlp (Table of Contents; Topic list)
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.
WinShowTrackRect (1.2)
                                                      Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINTRACKRECT
 
BOOL WinShowTrackRect(hwnd, fShow)
HWND hwnd;     /* handle of the window */
BOOL fShow;    /* show/hide flag       */
 
The WinShowTrackRect function hides or shows the tracking rectangle. A track
rectangle show level count is kept internally. (You can retrieve this value
using the WinQuerySysValue function with SV_TRACKRECTLEVEL as the system
value.) It is incremented by a hide operation and decremented by a show
operation. The track rectangle is visible only if the count is zero.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwnd       Identifies the window passed to the WinTrackRect function.
 
fShow      Specifies whether the rectangle is shown or hidden. If fShow is
           TRUE, the function shows the tracking rectangle. If fShow is
           FALSE, the function hides the tracking rectangle.
 
Return Value
 
The return value is TRUE if the function is successful or FALSE if an error
occurs.
 
Comments
 
An application must call this function to hide a rectangle it is tracking if
there is a possibility of corrupting the track rectangle while drawing
(showing it afterward). Since rclTrack in the TRACKINFO structure is
updating continuously, the application can examine the current tracking
rectangle coordinates to determine whether temporary hiding is necessary.
 
An application needs to call WinShowTrackRect only during asynchronous
drawing. If an application is drawing on one thread and issuing the
WinTrackRect function on another, pieces of a tracking rectangle may be left
behind. The drawing thread should call WinShowTrackRect when tracking may be
in progress. The application should provide for communication between the
two threads to ensure that if one thread is tracking, the drawing thread
will issue WinShowTrackRect. This can be achieved with a semaphore.
 
See Also
 
WinQuerySysValue, WinTrackRect, TRACKINFO