LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Why Don't My Panel Callbacks Work in a CVI Static Library Called From an External Compiler?

I have a static library that loads a panel that I call from a C++ Builder 6 application. The exported functions work fine when called from the external compiler, but none of the panel callbacks defined within the library are working.

I have included cvisupp.lib, cvirt.lib, cvi.lib, and cviwmain.lib in the external compiler's project. I have also tried including the .obj or .c (or both) callback table files generated from "Build / External Compiler Support". I am calling InitCVIRTE from WinMain (in the C++ app), and the .uir file is included in the same directory as the executable.

The CVI panel seems to receive no mouse events at all. Please help.
0 Kudos
Message 1 of 2
(2,971 Views)
Mark,

This is probably an error when linking the callbacks; the first thing to try here is to load you panel with the LoadPanelEx(...) function. This Ex version of load panel has an extra parameter that is the "calling module handle" that is used to determine where the callbacks reside.

If your callbacks reside in the same library that the call to LoadPanelEx you can use the default parameter (__CVIUserHInst) that indicates the current module.

Please give this a try and let me know if you have any problems.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,971 Views)