LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

EnableExtendedMouseEvents disabled by SuspendTimerCallbacks

Using CVI 7.1.1, the EnableExtendedMouseEvents is disabled whenever I call the SuspendTimerCallbacks function. 
 
i.e.
 
int CVICALLBACK PlotEvent (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
      if (event == EVENT_LEFT_MOUSE_UP)
     {
  // wait for UIF to update
  PostDeferredCall (GetCursorData, 0);
  
 }// end if (event)
 
 return 0;
 
}// end PlotEvent
0 Kudos
Message 1 of 4
(3,098 Views)

The implementation of extended mouse events relies on timer controls to work. If you are curious, you can verify this in <CVI71>\toolslib\toolbox\toolbox.c.

Instead of suspending all timers, could you accomplish the same goal by setting some flag that causes your own timer callbacks to not do anything?

Luis
NI

0 Kudos
Message 2 of 4
(3,087 Views)
I thought that might be the problem, but wasn't sure if this was a bug or intentional.
 
My original assumption with the SuspendTimerCallbacks function only affected timers controls in the user interface.  The documentation for that function is vague concerning this.  I was able to get around this by setting the enable attribute of the timer control.
 
Thanks for your reply.
0 Kudos
Message 3 of 4
(3,079 Views)

It is true SuspendTimerCallbacks only affects timer controls in the User Interface library. What might not be very clear, however, is that much of the Programmer's Toolbox is implemented on top of the User Interface library, so it too is affected by any global settings of the library. You're correct in that we should probably make this a bit more clear.

Thanks,
Luis

 

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