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 theSetControlAction
procedure to set or change the action procedure. TheSetControlAction
procedure is also available as theSetCtlAction
procedure.
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
TheSetControlAction
procedure changes thecontrlAction
field of the control's control record to point to the action procedure specified in theactionProc
parameter. If the cursor is in the specified control,TrackControl
calls 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. (TheTrackControl
function always highlights and drags the control
as appropriate.)SPECIAL CONSIDERATIONS
The value in thecontrlAction
field of the control's control record is used
byTrackControl
only 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 callSetControlAction
to change it.SEE ALSO
Action procedures are described in "Defining Your Own Action Procedures" beginning on page 5-109.