Hallo Eitan!
I am creating a new window class based on CWnd. I am placing it on
the View (CFormView). How can I get the notification or any other
indication that the cursor/mouse is not on this window?
I also tried the same to create a new window based on CStatic but I
was not able to detect when the mouse leaves the window.
Mouse messages are sent to the parent for CStatic windows. You can
override WM_NCHITTEST and return HTCLIENT. But AFAIK it is enough to set
the style SS_NOTIFY.
You can use TrackMouseEvent to get a message when the cursor leaves the
window.
Also you can get the current position of the cursor and you can compare
it with your window rect.
--
Martin Richter [MVP] WWJD
"In C we had to code our own bugs. In C++ we can inherit them."
FAQ :
http://www.mpdvc.de
Samples:
http://www.codeguru.com http://www.codeproject.com