LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

passing a variable parameter to a single callback function

Hi,
 
I have 10 command buttons which is linked to a single callback function.But I need to pass a variable parameter for each command button.ie  command button1( var=1),command button( var=2) etc... How can I do it.
Also I am going to create a thread everytime i click on command button.Is this a good idea to implement in the above mentioned way?
Please reply..
 
0 Kudos
Message 1 of 2
(3,095 Views)

I could solve it by using  creating an array (arr) with known  values. and calling

 SetCtrlAttribute( gPanelHandle,PANEL_COMMANDBUTTON_22,ATTR_CALLBACK_DATA,(arr+index)); 

for each command button.

This will solve the problem.

sorry for psoting it bfore thinkningSmiley Happy

0 Kudos
Message 2 of 2
(3,088 Views)