User Tools

Site Tools


ocxgetparamcount_return_number_of_parameters_for_current_event_.htm
Navigation:  Language Reference > App A - DDE, OLE, and OCX > OCX Library Procedures >====== OCXGETPARAMCOUNT (return number of parameters for current event) ====== Previous pageReturn to chapter overviewNext page

OCXGETPARAMCOUNT( reference )

blk2blue.jpg

OCXGETPARAMCOUNT Returns the number of parameters associated with the current OCX event.
Reference The label of the first parameter of the event processing callback procedure.

OCXGETPARAMCOUNT returns the number of parameters associated with the current .OCX event. This procedure is only valid when the .OCX event processing callback function is active.

Return Data Type:     USHORT

Example:

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

Count  LONG

Res    CSTRING(200)

Parm   CSTRING(30)

CODE

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

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

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

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

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

 END

 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

OCXGETPARAM

ocxgetparamcount_return_number_of_parameters_for_current_event_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1