LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Modify a panel in a library

I have an application containing several panels that are part of a library that I inherited. The source code for the library files is not available (of course!). If there is a mouse click on any of these panels, the application halts until the mouse button is released. I'm assuming that this is because EVENT_LEFT_CLICK is not handled by the panel.

 

Assuming that my assessment is correct, does anybody know of a workaround for this, given that the code for the panels is not available? Or, if I'm completely off track, can somebody please point me in the right direction?

0 Kudos
Message 1 of 4
(4,479 Views)

Hello jkerr!

 

According to your description of the behaviour, the application might actually handle the EVENT_LEFT_CLICK event in its panel callback, and might be setting some flags, so that other UI callbacks won't process events unless the EVENT_LEFT_CLICK_UP event has been received by the panel callback. Could you provide more details on how the application halts? Are there controls that are not changing anymore (e.g. flashing LEDs) or some other callbacks that should process data, but are not active during this time interval?

0 Kudos
Message 2 of 4
(4,455 Views)

The program normally runs through a series of tests, with each test running a loop that moves a stepper motor, flashes a lamp 50 times, taking readings from several ADC channels and displaying the data after each lamp flash. Between hearing the motor move and watching the data being updated on the screen, it's very obvious when the system stops running the program. When either mouse button is held down over a LabWindows panel everything just stops running.

The test sequence itself is pretty straightforward and does not rely on any callbacks.

0 Kudos
Message 3 of 4
(4,403 Views)

If you have access to the panel handle of the panel in the library, you could chain a callback function to the panel's callback function and swallow the EVENT_LEFT_CLICK events.  That would prevent the original callback in the library from recieving the event, though whatever code that's there won't be executed which could lead to other problems.  If you don't have the panel handle you might be able to guess it since CVI seems to assign them sequentially starting with 1, though doing this may not be reliable or could unexpectedly break in the future.

0 Kudos
Message 4 of 4
(4,373 Views)