I'm writing an ActiveX control. I must know when the mouse leaves the area of my control. I wrote the following function to track this event:
tme.cbSize = sizeof(tme);
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = m_hWnd;
I get the WM_MOUSELEAVE event in the following function:
LRESULT CNMButtonCtrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
if(message == WM_MOUSELEAVE)
AfxMessageBox ("WM_MOUSELEAVE", MB_OK, 0);
return COleControl::WindowProc(message, wParam, lParam);
Also, i have the following function using which i tell Windows that i want to listen to this event:
void CNMButtonCtrl::OnMouseMove(UINT nFlags, CPoint point)
So i'm notified when i receive the WM_MOUSELEAVE event.
My problem is:
I do not receive this event when the user moves the mouse with the LEFT BUTTON PRESSED.
How to solve this problem?