LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get control name in Callback fucntion

Solved!
Go to solution

in my sampleGUI.h it has this value

     PANEL_LOGO                60

...

 

I have a callback function as below:

 

    int CVICALLBACK sample(int panel, int controlID, int event, void *callbackData, int evenData1, int event Data2);

    

    The value of controlID is 60

 

     In this callback function, how do I get the constant name PANEL_LOGO back?

 

Thanks

0 Kudos
Message 1 of 3
(3,482 Views)

You can call:

 

char buf[256];

 

GetCtrlAttribute (panel, controlID, ATTR_CONSTANT_NAME, buf);

 

Luis

0 Kudos
Message 2 of 3
(3,479 Views)
Solution
Accepted by topic author thieny1
Thanks Luis
0 Kudos
Message 3 of 3
(3,448 Views)