You can connect user data to controls or panels by passing the adress of the
struct to their callback-data.
You can use one of the following functions, depending if you want to put the
data to a panel or to a control.
InstallPanelCallback (panel,&function,&data); // callbackfunction +
callbackdata
SetPanelAttribute (panel, ATTR_CALLBACK_DATA,&data); // only callbackdata
InstallCtrlCallback (panel,control,&function,&data);
SetCtrlAttribute (panel,control, ATTR_CALLBACK_DATA,&data );
In the callback function use GetPanelAttribute or SetPanelAttribute to
receive your data.
Regard,
Manfred
ikerugo77 schrieb in im Newsbeitrag:
506500000008000000E82B0000-1000509150000@exchange.ni.com...
> Hi dudes!!!
> Well the problem is simple.
> Im using a
struct to handle almost all the variables of a big part of
> my program and i've always used the USer event driven programming, but
> now i need to use a CVICALLBACK function for a specefied control on a
> panel, but i need to process information contained in the struct I
> told.--> ?How I can have acces to that variable struct from a
> CVICALLBACK? -->?I need to pass to the CVICALLBACK function as an
> aditional parameter, or What?
> I tried to declare the struct as a global variable, the callback
> functions looks like to not reach it.
> Please, Help!!!!
> Thanks for everithing