LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Callback function name/pointer difference?

It is possible with SetCtrlAttribute() to set the ATTR_CALLBACK_NAME and the ATTR_CALLBACK_FUNCTION_POINTER. Can I only specify one simultaneously, or do I have to specify them both? Which one do I use in which case?

The idea is that I have a function which builds a panel from scratch. The function which calls this function should specify the callback function of the to-be-made-controls of the panel. I'm a bit confused how to do this, with these 2 available options.

I'm making a periodic table of elements panel, and dependent on the program which uses it there should be different calculations made when an element-button is pressed. The easiest way is to let the calling program specify its own callback function.

CVI 6.0, btw.

Greetings,

Erwin Timmerman
0 Kudos
Message 1 of 2
(2,843 Views)
You can only set the value for ATTR_CALLBACK_FUNCTION_POINTER. ATTR_CALLBACK_NAME is not a settable attribute. See the function panel help for GetCtrlAttribute for more information.

I hope this helps
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,833 Views)