Joseph Ferner
April 9th, 1999, 03:07 AM
How do I detect when the mouse has left a control or window. I tried using TrackMouse but the function was undefined. I would like to avoid hooks also
|
Click to See Complete Forum and Search --> : Mouse Leave Event Joseph Ferner April 9th, 1999, 03:07 AM How do I detect when the mouse has left a control or window. I tried using TrackMouse but the function was undefined. I would like to avoid hooks also ric April 9th, 1999, 04:25 AM Override OnMouseMove() Candan April 9th, 1999, 04:42 AM m_bMouseCaptured=FALSE; OnMouseMove(UINT nFlags, CPoint point) { CRect rc; this->GetClientRect(&rc); if (!rc.PtInRect(point)) { if( m_bMouseCaptured==FALSE) { SetCapture(); m_bMouseCaptured=TRUE; } } else { if(m_bMouseCaptured) { ReleaseCapture(); m_bMouseCaptured=FALSE; } } } never try. hope help. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |