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 theSizeControl
procedure.
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
TheSizeControl
procedure changes the rectangle specified in thecontrlRect
field 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 thew
andh
parameters; 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. TheSizeControl
procedure usesHideControl
, which changes the window's update region.SEE ALSO
Listing 5-24 on page 5-61 illustrates the use ofSizeControl
to change the size of a scroll bar.