Important: The information in this document is obsolete and should not be used for new development.
MoveControl
To move a control within its window, you can use theMoveControlprocedure.
PROCEDURE MoveControl (theControl: ControlHandle; h: Integer; v: Integer);
theControl- A handle to the control you wish to move.
h- The horizontal coordinate (local to the control's window) of the new location of the upper-left corner of the control's rectangle.
v- The vertical coordinate (local to the control's window) of the new
location of the upper-left corner of the control's rectangle.DESCRIPTION
TheMoveControlprocedure moves the control to the new location specified by thehandvparameters, using them to change the rectangle specified in thecontrlRectfield of the control's control record. When the control is visible,MoveControlfirst hides it and then redraws it at its new location.For example, if the user resizes a document window that contains a scroll bar, your application can use
MoveControlto move the scroll bar to its new location.SEE ALSO
Listing 5-24 on page 5-61 illustrates the use ofMoveControlto change the location of a scroll bar.