LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

can I create callback funtion for a newctrl ?

On the panel i create a command button by using NewCtrl();now i want to add a callback funtion for the newctrl, is it possible?if can ,how?
thanks for any help!
0 Kudos
Message 1 of 3
(2,722 Views)
Hi,
obviously the callback function must exist, and therefore you know what it is called.
With this, you simply call
SetCtrlAttribute(panelHandle,controlID,ATTR_CALLBACK_FUNCTION_POINTER,functionname);

Hope that helps

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 3
(2,722 Views)
Another possibility is to use InstallCtrlCallback, which in addition permits you to assign a value to the callbackData parameters in one call only.
In both cases, the function has the structure of the functions created by the uir editor.

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 3 of 3
(2,722 Views)