Mouse leave message is not received when it leaves the control
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Mouse leave message is not received when it leaves the control

  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Mouse leave message is not received when it leaves the control

    I am developing an outlook bar control in visual C++ using MFC classes. Currently when the mouse hovers a button, then a 3D look is generated to show that mouse is currently on that button and when i move the mouse from this button to the next, the previous button gets to normal state and the new button over which the mouse has now moved shows a 3D look. Until now things are going fine.

    The problem is that when i move the mouse to the first button in the outlook bar control, it gives 3D look which is good, but when i move the mouse further up so that it leaves the boundary of the control, then the button remains in that 3D position which is wrong, instead it should restore its normal position.

    I am handling this functionality in the when_mouse_move event handler. Actually when mouse moves from first button to the tool bar of the main window, then it neither receives the when_mouse_move message nor it receives the when_mouse_leave message to indicate me that mouse has passed beyond the boundary of the control. Kindly help me to fix this issue.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,392

    Re: Mouse leave message is not received when it leaves the control

    You seem to handle these mouse messages not correct!
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center