BUG: WM_MOUSEMOVE Messages Returned Out of Sequence (141357)
The information in this article applies to:
- Microsoft Visual C++, Macintosh Cross-Development Addon 2.0
- Microsoft Visual C++, Macintosh Cross-Development Addon 4.0
This article was previously published under Q141357 SYMPTOMS
When you move the mouse pointer over a window, some of the WM_MOUSEMOVE
messages arrive out of order. For example, when you draw using the Scribble
sample program, an old point is occasionally received causing a zig-zag
effect.
CAUSE
There is a bug in the WLM implementation of ::PeekMessage that causes some
of the mouse move messages to be retrieved later.
RESOLUTION
Check the time field of the MSG record of the current message when
processing a WM_MOUSEMOVE message. If the time is older than that of the
previous WM_MOUSEMOVE message, discard the message. See the Sample Code
section of this article for an example.
An alternative solution is to use Mac APIs (such as StillDown() and
GetMouse()) directly to track the mouse until the button is released. This
method dramatically increases mouse tracking and is a common method that
native Macintosh applications use. Keep in mind that this will keep the
system locked until the mouse is released.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
REFERENCES
Books Online - WM_MOUSEMOVE, ::PeekMessage, GetCurrentMessage
68k Porting Reference - PeekMessage
Inside Macintosh - Macintosh Toolbox Essentials
Modification Type: | Major | Last Reviewed: | 10/24/2003 |
---|
Keywords: | kbBug kbfix KbUIDesign KB141357 |
---|
|