Important: The information in this document is obsolete and should not be used for new development.
SetControlMaximum
To change the maximum setting of a control and redraw its indicator or scroll
box accordingly, you can use theSetControlMaximumprocedure. TheSetControlMaximumprocedure is also available as theSetCtlMaxprocedure.
PROCEDURE SetControlMaximum (theControl: ControlHandle; maxValue: Integer);
theControl- A handle to the control whose maximum setting you wish to change.
maxValue- The new maximum setting.
DESCRIPTION
TheSetControlMaximumprocedure changes thecontrlMaxfield of the control record to the setting you specify in themaxValueparameter and redraws its indicator
or scroll box to reflect its new range.When you create a control, you specify an initial maximum setting either in the control resource or in the
maxparameter of theNewControlfunction. To determine a control's current maximum setting, use theGetControlMaximumfunction.When you set the maximum setting of a scroll bar equal to its minimum setting, the control definition function makes the scroll bar inactive; when you make the maximum setting exceed the minimum, the control definition function makes the scroll bar active again.
SEE ALSO
Listing 5-16 on page 5-38 illustrates the use ofSetControlMaximumto specify the maximum setting for a scroll bar.