|
-
April 22nd, 1999, 04:12 AM
#1
Cursor leaving window
How do i know when my cursor has left a window client rect (without tricks)
like in tooltips ?
-
April 22nd, 1999, 04:28 AM
#2
Re: Cursor leaving window
Hello
Something like the following code in your CView::OnMouseMove handler.
ClientToScreen ( &point );
GetClientRect ( &rcClient );
ClientToScreen ( &rcClient );
if ( rcClient.PtInRect(point) )
{
// cursor within window
SetCapture();
}
else {
// cursor outside window
ReleaseCapture();
}
Hope that helps or gives you some ideas...
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
|