Important: The information in this document is obsolete and should not be used for new development.
SetControlAction
If you set the action procedure toPointer(-1)when you useTrackControl, you can use theSetControlActionprocedure to set or change the action procedure. TheSetControlActionprocedure is also available as theSetCtlActionprocedure.
PROCEDURE SetControlAction (theControl: ControlHandle; actionProc: ProcPtr);
theControl- A handle to the control whose action procedure you wish to change.
actionProc- A pointer to an action procedure defining what action your application takes while the user holds down the mouse button.
DESCRIPTION
TheSetControlActionprocedure changes thecontrlActionfield of the control's control record to point to the action procedure specified in theactionProcparameter. If the cursor is in the specified control,TrackControlcalls this action procedure
when user holds down the mouse button. You must provide the action procedure, and it must define some action to perform repeatedly as long as the user holds down the mouse button. (TheTrackControlfunction always highlights and drags the control
as appropriate.)SPECIAL CONSIDERATIONS
The value in thecontrlActionfield of the control's control record is used
byTrackControlonly if you set the action procedure toTrackControl to Pointer(-1).An action procedure is usually specified in a parameter to
TrackControl; you generally don't need to callSetControlActionto change it.SEE ALSO
Action procedures are described in "Defining Your Own Action Procedures" beginning on page 5-109.