TrackBox
TrackBox Keep zoom box highlighted while mouse is down
#include <Windows.h> Window Manager
Boolean TrackBox( theWindow, thePoint, partCode );
WindowPtr theWindow ; window containing zoom box
Point thePoint ; Point in zoom box where button pressed
short partCode ; 7=inZoomIn, 8=inZoomOut
returns Did the user decide to zoom/unzoom?
Use TrackBox to take care of tracking the mouse when it gets pressed in the
zoom box of a window (in the top right corner of zoomDocProc windows). It
highlights the zoom box as long as the mouse is inside of it and retains control
while the button is down.
theWindow identifies the window containing the box in which the mouse was
pressed. It is normally a value obtained via FindWindow after it
returned a value of inZoomOut or inZoomIn.
thePoint is a point in global coordinates (as obtained from an EventRecord)
It should be inside the zoom box of theWindow .
partCode should be the same as the return value of a previous FindWindow
(inZoomIn or inZoomOut). Calling with the wrong value does NOT
track the box (i.e., using inZoomIn when already zoomed in).
Returns: a Boolean value indicating whether the button was released while the
mouse was still inside of the zoom box. It is one of:
FALSE Released outside of the box (don't zoom/unzoom)
TRUE Released inside zoom box (do zoom/unzoom)

Notes: When this function returns FALSE, it means the user moved the mouse
outside of the zoom box before the button was released. In that case, the
appropriate action is to do nothing. A return value of TRUE indicates that
the window should be zoomed.
Like TrackGoAway, this function retains control until the button is
released. Highlighting and unhighlighting of the zoom box is performed
automatically as the mouse moves into and out of it. The appearance of the
zoom box highlighting is defined by the window definition function.
You can't arbitrarily pick from inZoomIn and inZoomOut; you must use a
partCode that is valid at the time of the call (i.e., from FindWindow).