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 theMoveControl
procedure.
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
TheMoveControl
procedure moves the control to the new location specified by theh
andv
parameters, using them to change the rectangle specified in thecontrlRect
field of the control's control record. When the control is visible,MoveControl
first 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
MoveControl
to move the scroll bar to its new location.SEE ALSO
Listing 5-24 on page 5-61 illustrates the use ofMoveControl
to change the location of a scroll bar.