Thread View: comp.os.ms-windows.programmer.win32
4 messages
4 total messages
Started by Michael Zarky
Mon, 12 Jul 1999 00:00
knowing if mouse is moving or not
Author: Michael Zarky
Date: Mon, 12 Jul 1999 00:00
Date: Mon, 12 Jul 1999 00:00
26 lines
2175 bytes
2175 bytes
I'm trying to hide the mouse cursor when I see that it hasn't been moved for several seconds, and show it again the moment I get a new WM_MOUSEMOVE message. [I have good reasons for this - this a largely hands-off "real-time" graphical feedback program, run full screen (well, I won't remove the cursor if the window isn't full size) and on many screens I get a very annoying flicker of the cursor during the constant drawing. Once set up, the user might not operate the mouse for many minutes at all]] But I don't seem to get WM_MOUSEMOVE messages when the cursor is over the menu, apparently that is not part of the scheme - a fairly fatal problem! So I am wondering if someone has any suggestions how I might accomplish this. I've used a mode where I 'park' the cursor at the right hand edge of the screen (tho I assume there are 'left-handed' cursors for which I would have to allow) but this is disruptive to the user's sense of continuity of placement of the cursor, so I would really like to try simply making it invisible in place. But I need to know all the time when it has been moved - some other messages to look at? I'll be very grateful for your suggestions. I hope I haven't cross-posted to too many newsgroups - not really sure which would be most appropriate. Thank you, Michael Zarky
Re: knowing if mouse is moving or not
Author: Paul Andre LeBlanc
Date: Mon, 12 Jul 1999 00:00
Date: Mon, 12 Jul 1999 00:00
10 lines
1156 bytes
1156 bytes
Michael Zarky wrote: > > But I don't seem to get WM_MOUSEMOVE messages when the > cursor is over the menu > Use WM_NCHITTEST instead - you'll get that when the mouse moves over any part of the window, and even when it is over a child of your window. Paul
Re: knowing if mouse is moving or not
Author: Scott Seely
Date: Mon, 12 Jul 1999 00:00
Date: Mon, 12 Jul 1999 00:00
17 lines
1428 bytes
1428 bytes
Another alternative is overriding WM_NCMOUSEMOVE. Now, all the mouse messages have corresponding WM_NC (non-client) messages for situations like what you just described. I'm not sure that WM_NCHITTEST will work (it should only get fired for non-client mouse movemenets?). Paul Andre LeBlanc <paul.a.leblanc@sympatico.ca> wrote in message news:378A2D7A.2391@sympatico.ca... > Michael Zarky wrote: > > > > But I don't seem to get WM_MOUSEMOVE messages when the > > cursor is over the menu > > > > Use WM_NCHITTEST instead - you'll get that when the mouse moves over any > part of the window, and even when it is over a child of your window. > > Paul
Re: knowing if mouse is moving or not
Author: Paul Andre LeBlanc
Date: Tue, 13 Jul 1999 00:00
Date: Tue, 13 Jul 1999 00:00
16 lines
1652 bytes
1652 bytes
Scott Seely wrote: > I'm not sure that WM_NCHITTEST will work (it should only get fired for non-client mouse movemenets?). No, it works in the client area as well - note that HTCLIENT is a defined return value, indicating that the mouse is in the client area. WM_NCHITTEST is sent immediately prior to the other mouse messages, and its return value determines whether the next message will be - for example - WM_MOUSEMOVE or WM_NCMOUSEMOVE. The most significant thing about WM_NCHITTEST is the fact that it gets passed from a child window up to its parent, allowing mouse motion anywhere in any child to be detected by the parent (very useful for implementing context-based help). Paul
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads