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 theSetControlMaximum
procedure. TheSetControlMaximum
procedure is also available as theSetCtlMax
procedure.
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
TheSetControlMaximum
procedure changes thecontrlMax
field of the control record to the setting you specify in themaxValue
parameter 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
max
parameter of theNewControl
function. To determine a control's current maximum setting, use theGetControlMaximum
function.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 ofSetControlMaximum
to specify the maximum setting for a scroll bar.