From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with void *callbackdata parameter

Hi,
I'm trying to use the callback data parameter.
first I use the SetPanelAttribute to give a value to the callbackdata.
after that, as I understood, whenever a callback is called (from the same), this parameter should be equel to the value I set.
but wht I get is NULL.
(if I call the getPanelAttribute from the callback function, I get the value I assighned).

so what am I doing wrong??

I added a small project I did to test that...

thanx,
Neta.
0 Kudos
Message 1 of 2
(2,574 Views)
You are setting the callback data for the panel, but the callback you are checking it in is actually a control callback. If you setup a callback function for the panel, you will indeed see the callback data. Each control on the panel has a unique value for callback data (which is useful for distinguishing between controls beyond simply the control ID). If you use SetCtrlAttribute to set the callback data for the test button (PANEL_TEST), you will see that value reflected in the callbackData parameter.

Regards,

Alex
Message 2 of 2
(2,571 Views)