ATL: WM_MOUSELEAVE
-
hello On WM_MOUSELEAVE message the below function OnMouseLeave() is not getting called... (however OnInitDialog() is getting called) I have created a dialog box and wanted to call my function OnMouseLeave() on WM_MOUSELEAVE message. Declared a message map as below, BEGIN_MSG_MAP(CMyClass) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave) END_MSG_MAP() any idea if am missing something ? Thanks and Regards, Supriya Tonape
-
hello On WM_MOUSELEAVE message the below function OnMouseLeave() is not getting called... (however OnInitDialog() is getting called) I have created a dialog box and wanted to call my function OnMouseLeave() on WM_MOUSELEAVE message. Declared a message map as below, BEGIN_MSG_MAP(CMyClass) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) MESSAGE_HANDLER(WM_MOUSELEAVE, OnMouseLeave) END_MSG_MAP() any idea if am missing something ? Thanks and Regards, Supriya Tonape
Hello, this is a MS design feature. You need to call TrackMouseEvent prior to receive a WM_MOUSELEAVE-Message. See: http://msdn.microsoft.com/en-us/library/ms645615%28VS.85%29.aspx for more info. Kind regards Frank
-
Hello, this is a MS design feature. You need to call TrackMouseEvent prior to receive a WM_MOUSELEAVE-Message. See: http://msdn.microsoft.com/en-us/library/ms645615%28VS.85%29.aspx for more info. Kind regards Frank
Just for completeness, the best place where you could put the
TrackMouseEvent
function, is inside the handler of theWM_MOUSEENTER
message ;) -
Just for completeness, the best place where you could put the
TrackMouseEvent
function, is inside the handler of theWM_MOUSEENTER
message ;)Thank you. Yes I am using the trackmouseevent in OnMouseLeave() method.. actually i just replaced message as "WM_MOUSEMOVE" and it started working.. but thanks much for the help. Also I cud not find WM_MOUSEENTER message in respective .h file.. thanks and regards, Supriya Tonape
-
Thank you. Yes I am using the trackmouseevent in OnMouseLeave() method.. actually i just replaced message as "WM_MOUSEMOVE" and it started working.. but thanks much for the help. Also I cud not find WM_MOUSEENTER message in respective .h file.. thanks and regards, Supriya Tonape
also I used TME_LEAVE to check mouse actions in trackmouseevent structure initialization.. in case if somebody faces the prob as I had..