LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using EnableExtendedMouseEvents()

I am using EnableExtendedMouseEvents() in my cvi code to tell when a user has placed a mouse on top of one of my seven canvases. When this happens, I fill in the text box with a description of the function. It is kind of like a tooltip but allows much more text. The problem is that I keep getting EVENT_MOUSE_MOVE events every Min Event Interval secs, and each time I replace the text in the text box. this is crazy. how can i do it better?
0 Kudos
Message 1 of 2
(2,856 Views)
You'll get an EVENT_MOUSE_MOVE only when you move the mouse. If it looks like you getting an EVENT_MOUSE_MOVE when the mouse isn't moving ("I keep getting EVENT_MOUSE_MOVE events"), check the switch (event) structure in the callback. Verify that you don't have a case without a break before the case EVENT_MOUSE_MOVE.

To avoid redisplaying the text as you're moving the mouse across a canvas, keep track of the last canvas for which you displayed text. Until the mouse leaves that canvas, don't redisplay the text. You apparently know which text to display so I assume you know which canvas you're over. Use a global to store the control number for the canvas. Until that global changes, don't redisplay the text.
0 Kudos
Message 2 of 2
(2,856 Views)