LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Wolfgang

EVENT_MOUSE_OVER_CONTROL and EVENT_MOUSE_ABANDONED_CONTROL

Status: New

Hi,

 

sometimes it is useful to know if the mouse cursor is above a certain control or not, e.g. a graph control where one might want to toggle the visibility of display coordinates, etc.

 

Right now, this can be accomplished by installing a timer that periodically calls GetRelativeMouseState() to get the current mouse coordinates which can then be compared to the control coordinates.

To me, this seems to be quite some overhead to have a timer busy all the time checking for various, possibly very many, control coordinates. It appears simpler to have two more events, similar to EVENT_GOT_FOCUS and EVENT_LOST_FOCUS, but triggered on mouse position alone.

 

The suggestion is also different from EVENT_MOUSE_POINTER_MOVE.