Owen
Owen

Reputation: 4173

How can we capture a mouse event when it's already out of the client area?

I have an application that has a list of buttons and has customized tooltips. Whenever the mouse hovers through the buttons, the tooltips come out and is working fine. However, I want to hide the tooltips when the mouse cursor is outside the client area. How can I tell my application that the mouse is already out of the client area, when the mouse events I have are limited to the client area alone?

Thanks...

Upvotes: 1

Views: 1251

Answers (2)

Roel
Roel

Reputation: 19622

Or use GetCapture(), that's what I always do.

Upvotes: 1

John Knoeller
John Knoeller

Reputation: 34148

You use TrackMouseEvent, this will send you a WM_MOUSELEAVE message when the mouse leaves your window.

Upvotes: 3

Related Questions