Important: The information in this document is obsolete and should not be used for new development.
SizeControl
To change the size of a control's rectangle, use theSizeControlprocedure.
PROCEDURE SizeControl (theControl: ControlHandle; h: Integer; v: Integer);
theControl- A handle to the control you wish to resize.
w- The new width, in pixels, of the resized control.
h- The new height, in pixels, of the resized control.
DESCRIPTION
TheSizeControlprocedure changes the rectangle specified in thecontrlRectfield of the control's control record. The lower-right corner of the rectangle is adjusted so
that it has the width and height specified by thewandhparameters; the position of the upper-left corner is not changed. If the control is currently visible, it's first hidden and then redrawn in its new size. TheSizeControlprocedure usesHideControl, which changes the window's update region.SEE ALSO
Listing 5-24 on page 5-61 illustrates the use ofSizeControlto change the size of a scroll bar.