Important: The information in this document is obsolete and should not be used for new development.
GetControlValue
To determine a control's current setting, use theGetControlValuefunction. TheGetControlValuefunction is also available as theGetCtlValuefunction.
FUNCTION GetControlValue (theControl: ControlHandle): Integer;
theControl- A handle to a control.
DESCRIPTION
TheGetControlValuefunction returns as its function result the specified control's current setting, which is stored in thecontrlValuefield of the control record.When you create a control, you specify an initial setting either in the control resource or in the
valueparameter of theNewControlfunction. You can change the setting by using theSetControlValueprocedure.SEE ALSO
Listing 5-12 on page 5-33 and Listing 5-13 on page 5-35 illustrate the use ofGetControlValuefor determining the current setting of, respectively, a pop-up
menu and a checkbox. Listing 5-16 on page 5-38, Listing 5-18 on page 5-48, and
Listing 5-20 on page 5-56 illustrate the use of this function for determining the
current setting of a scroll bar.