tags:

views:

49

answers:

2

I have created a control and the mosemove for that control makes it change color, but I want to change it back to default when my mouse moves out of that control. I would have thought WM_MOUSELEAVE would do it but it didn't.

Thanks

+4  A: 

That would be the correct message.

Are you calling TrackMouseEvent?

Brian R. Bondy
where is trackmousevent called?
Milo
TrackMouseEvent just tells the OS to let you know about certain mouse events. However, it is a one shot event, so it needs to be called again after an event is handled in order to receive future events. Follow the above link for more info.
bsruth
OK thanks......
Milo
A: 

You could try with WM_MOUSELEAVE (we have this in a CView derived class )

But I think the best way is to use _TrackMouseEvent.

Max.

Max