How do i know when my cursor has left a window client rect (without tricks)
like in tooltips ?
Printable View
How do i know when my cursor has left a window client rect (without tricks)
like in tooltips ?
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...