mouseleave
-
I am looking for a way to get the mouseleave/mouseout method for my activex control. When I test with ActiveX container tester mousemove can get the event when it is on the control. However, once the mouse is out of control, i don't get anything. Thank you for help Shin
-
I am looking for a way to get the mouseleave/mouseout method for my activex control. When I test with ActiveX container tester mousemove can get the event when it is on the control. However, once the mouse is out of control, i don't get anything. Thank you for help Shin
You can use the TrackMouseEvent[^] API. It only works on Win98 or above, so if you need Win95 compatibility, you'll have to simulate MouseLeave using a timer: Start the timer when the mouse is first moved into the control. In the timerproc, use GetCursorPos to see if the cursor is outside of the window. If it is, fire a MouseLeave event, and stop the timer.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
You can use the TrackMouseEvent[^] API. It only works on Win98 or above, so if you need Win95 compatibility, you'll have to simulate MouseLeave using a timer: Start the timer when the mouse is first moved into the control. In the timerproc, use GetCursorPos to see if the cursor is outside of the window. If it is, fire a MouseLeave event, and stop the timer.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi:-D Cool! I wish I'd known about that. The number of times I've used
SetCapture()
and tested the location of the mouse cursor... :omg:Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
-
:-D Cool! I wish I'd known about that. The number of times I've used
SetCapture()
and tested the location of the mouse cursor... :omg:Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"