LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI_Callback

Is it somehow possible to start an CVI_Callback "X" out of another
CVI_Callback "Y" (like a subroutine)
0 Kudos
Message 1 of 3
(3,106 Views)
The answer is definitely yes.

The simplest way to do this is to simply put in your code this line:

callbackToCall (panel, control, event, callbackData, eventData1, eventData2);

obviously you have to fill in parameters according to what your callback expects: if your callback doesn't use some of them (for example callbackData and/or eventData), you can put 0 or NULL as needed. In userint.h there is an interesting table that lists all events with their associated macro (symbolic name) and the contents of eventData parameters when the function is generated by the user interface: you can use it as a trace for your job.

The other way is to use the toolbox function

CallCtrlCallback (panel, control, event, eventData1, eventData2, &rtnval);

this is better if you use
to chain control callbacks using the appropriate function in the programmer's toolbox.

The online help for this function can help you in filling the parameters of the function. In order to use this function you must include the programmer's toolbox in your project either as an instruments or as a library. The toolbox is located in the toolslib\toolbox directory.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,106 Views)
You can use
1) CallCtrlCallback() if you want to call directly the callback function associated with your ctrl or
2) PostDeferredCall (); if you want to call it just after you leave the current callback.
0 Kudos
Message 3 of 3
(3,106 Views)