|
-
April 9th, 1999, 03:07 AM
#1
Mouse Leave Event
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
-
April 9th, 1999, 04:25 AM
#2
-
April 9th, 1999, 04:42 AM
#3
Re: Mouse Leave Event
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|