Take a look at this example:
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/1098/c++/c++1...
SetCapture() will not work effectively if you move the mouse real fast.
--
Ajay Kalra [MVP - VC++]
Quote:
> There is not this message on message handler list, using
> Spy++ the only messages it use is MOUSEMOVE and SETCURSOR
> Ale
> >-----Original Message-----
> >Take a look at WM_MOUSELEAVE/TrackMouseEvent. This sends
> notification when
> >mouse leaves the window.
> >--
> >Ajay Kalra [MVP - VC++]
> >> Hi,
> >> i'm writing a new Button class deriving it from CWnd..
> >> I've to know when the mouse is over the Button and when
> it
> >> is out.. MOUSEMOVE doesn't if you quickly move the mouse
> >> out..
> >> I've to do it in my Button Class and not on Main
> Window..
> >> Thanks..
> >> Ale
> >.