Basically I call TrackMouseEvent in my WM_CREATE then I call it again after a WM_MOUSELEAVE but this freezes up my program. Where should I be sticking it? Thanks
+1
A:
You need to call TrackMouseEvent when the mouse enters your control, and not when it leaves your control.
You can call TrackMouseEvent on the WM_MOUSEMOVE message. You don't need to call TrackMouseEvent every time WM_MOUSEMOVE is fired, just once up until you get another WM_MOUSELEAVE. After you get a WM_MOUSELEAVE you can set some flag so the next call to WM_MOUSEMOVE will know to call TrackMouseEvent again.
Basically you can emulate a fictional WM_MOUSEENTER by using WM_MOUSEMOVE and also having that flag set.
Brian R. Bondy
2010-05-22 01:40:27
Which event is that?
Milo
2010-05-22 01:41:03
@ user146780: See edit
Brian R. Bondy
2010-05-22 01:48:34