LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

possible bug in toolbar but toolbar.c file is missing

I used the toolbar control with version 7 of Labwindows/CVI without a problem. Now I upgraded to version 8.0 and I experience a problem with one of the ring controls (not with the other ring controls or command buttons) The callback attached to this ringcontrol is called with an errorneous panel and control handle. When I tried to attach the toolbar.c file it appeared missing. Can someone please send me the toolbar.c file beloing to version 8?

Thanks,
Hans

0 Kudos
Message 1 of 3
(3,230 Views)
We no longer ship toolbar.c with CVI 8.0. We made some significant improvements to the toolbar for 8.0  and becuase of the changes are unable to ship the source of the toolbar instrument.

If you can further describe what the problem is and perhaps include an example that demonstrates the issue, I can investigate the issue for you.

Thanks

Bilal Durrani
NI
0 Kudos
Message 2 of 3
(3,211 Views)
Hans,

I suspect what you may be seeing is a change in behavior that was introduced in the toolbar for 8.0. Whenever you assign a control callback to a toolbar item, the old behavior was to pass the panel handle and control id for the associated control back through the callback. In 8.0, we changed this behavior to pass the ToolbarType through the panel id and the item index through the control id.

For example:

int CVICALLBACK ToolbarItemCallback (int panel, int control, int event,
        void *callbackData, int eventData1, int eventData2)
{
    ToolbarType toolbar = (ToolbarType)panel;
    int toolbarItemIndex = control;

   /* ... */
}

This change was made to enable more flexibility in the item callbacks. You can still obtain the panel and control IDs if needed by calling the new toolbar API function Toolbar_GetCtrlFromIndex. Unfortunately this did break backward compatibility with old programs that relied on these IDs being set.

Hope this helps,

-alex
0 Kudos
Message 3 of 3
(3,203 Views)