OCXSETPARAM (set current event parameter string)

Top  Previous  Next


OCXSETPARAM( reference ,number ,value )


Sets the value of a parameter associated with the current OCX event.


The label of the first parameter of the event processing callback procedure.


The number of the parameter to set.


A string constant or variable containing the value to set.

OCXSETPARAM sets the value of the number parameter associated with the current event. This is only allowed on parameters that are passed by address (see the OCX control's documentation for valid parameters to set). If the modification is not allowed it will be ignored. This procedure is only valid when the .OCX event processing callback function is active.


OEvent  PROCEDURE(Reference,OleControl,CurrentEvent)  !Event processing callback proc

Count  LONG

Res    CSTRING(200)

Parm    CSTRING(30)


IF CurrentEvent <> OCXEVENT:MouseMove                !Eliminate mouse move events

 Res = 'Control ' & OleControl & ' Event ' & OleControl{PROP:LastEventName} & ':'

 LOOP Count = 1 TO OCXGETPARAMCOUNT(Reference)       !Cycle through all parameters

  Parm = OCXGETPARAM(Reference,Count)                !getting each parameter name

  Res = CLIP(Res) & ' ' & Parm                       !and concatenate them together

  OCXSETPARAM(Reference,1,'1')                       !Change the parameter's value


 GlobalQue = Res                                     !Assign to a global QUEUE

 ADD(GlobalQue)                                      !add the entry for later display

END                                                  !of all the OCX events and their

RETURN(True)                                         !parameters


See Also:

Callback Functions