Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 4 - Window Manager / Window Manager Reference
Window Manager Routines / Resizing Windows


SizeWindow

Use the SizeWindow procedure to set the size of a window.

PROCEDURE SizeWindow (theWindow: WindowPtr; w, h: Integer;
                        fUpdate: Boolean);
theWindow
A pointer to the window record of the window to be sized.
w
The new window width, in pixels.
h
The new window height, in pixels.
fUpdate
A Boolean value that specifies whether any newly created area of the content region is to be accumulated into the update region (TRUE) or not (FALSE). You ordinarily pass a value of TRUE to ensure that the area is updated. If you pass FALSE, you're responsible for maintaining the update region yourself. For more information on adding rectangles to and removing rectangles from the update region, see the description of InvalRect on page 4-99 and ValidRect on page 4-100.
DESCRIPTION
The SizeWindow procedure changes the size of the window's graphics port rectangle to the dimensions specified by the w and h parameters, or does nothing if the values of w and h are 0. The Window Manager redraws the window in the new size, recentering the title and truncating it if necessary. Your application calls SizeWindow immediately after calling GrowWindow, to adjust the window to any changes made by the user through the size box.

SEE ALSO
See Listing 4-13 on page 4-58 for an example that calls SizeWindow to resize a window based on the return value of GrowWindow.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996