Important: The information in this document is obsolete and should not be used for new development.
SizeWindow
Use theSizeWindow
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 ofTRUE
to ensure that the area is updated. If you passFALSE
, 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 ofInvalRect
on page 4-99 andValidRect
on page 4-100.DESCRIPTION
TheSizeWindow
procedure changes the size of the window's graphics port rectangle to the dimensions specified by thew
andh
parameters, or does nothing if the values ofw
andh
are 0. The Window Manager redraws the window in the new size, recentering the title and truncating it if necessary. Your application callsSizeWindow
immediately after callingGrowWindow
, 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 callsSizeWindow
to resize a window based on the return value ofGrowWindow
.