Jochen Riekhof wrote:
> Hi...
>
> while I found onMouseMoved: event easily, I could not find
> mouseEntered/exited events covered anywhere. So, I wrote a workaround
> using setCapture/releaseCapture calls. This works very well, but
> contrary to what I have read in the MSDN docs, all the accelerator
> keys are eaten somehow while the mouse is over my view (i.e. capture
> is on). Is there a fix, or even better, is there a hidden possility
> to get mouseEntered/exited events somehow?
Hi Jochen,
In the MSDN remarks section for the SetCapture function it says: "When the
mouse is captured, menu hotkeys and other keyboard accelerators do not
work." so it looks like this is the expected behavior.
I have a Presenter subclass that generates mouseEntered/exited events that I
use for creating a "url link" effect. I use #onMouseMoved: to set a flag
that the mouse is over the client area, and then make use of the SetTimer
message (See ProcessMonitor for an example of using this message) to check
that it is still over the client area.
One problem I did have is that the mouse could move into subViews of my
presenter and therefore not send #onMouseMoved: to my presenter. Since this
message does not trigger an event, I ended up creating an Interactor
subclass which forwards the subViews's onMouseMoved: messages to my
presenter.
Another solution would be to implement the _TrackMouseEvent function. I have
played around with this, but the solution above does what I need.
Hope that makes sense. I can send you the package if you would like to look
at the code.
Thanks,
Steve
--
Steve Waring
Email:
[hidden email]
About:
http://www.dolphinharbor.org/dh/harbor/steve.htmlJournal:
http://www.stevewaring.net/blog/home/index.html