Important: The information in this document is obsolete and should not be used for new development.
ZoomWindow
Use theZoomWindowprocedure to zoom the window when the user has pressed and released the mouse button with the cursor in the zoom box.
PROCEDURE ZoomWindow (theWindow: WindowPtr; partCode: Integer; front: Boolean);
theWindow- A pointer to the window record of the window to be zoomed.
partCode- The result (either
inZoomInorinZoomOut) returned by theFindWindowfunction.front- A Boolean value that determines whether the window is to be brought to the front. If the value of
frontisTRUE, the window necessarily becomes the frontmost, active window. If the value offrontisFALSE, the window's position in the window list does not change. Note that if a window was active before it was zoomed, it remains active even if the value offrontisFALSE.DESCRIPTION
TheZoomWindowprocedure zooms a window in or out, depending on the value of
thepartCodeparameter. Your application callsZoomWindow, passing it the part
code returned byFindWindow, when it receives a result ofTRUEfromTrackBox.
TheZoomWindowprocedure then changes the window's port rectangle to either
the user state (if the part code isinZoomIn) or the standard state (if the part code isinZoomOut), as stored in the window state data record, described in the section "Zooming a Window" beginning on page 4-53.If the part code is
inZoomOut, your application ordinarily calculates and sets the standard state before callingZoomWindow.For best results, call the QuickDraw procedure
EraseRect, passing the window's graphics port as the port rectangle, before callingZoomWindow.SEE ALSO
See Listing 4-12 on page 4-55 for an example that calculates and sets the standard state and then callsZoomWindowto zoom a window.