menu: nasty bug in menu tracking
michaelj at lennox.com.au
Thu Dec 4 18:16:08 CST 2003
Actually I think the code would work better like this:-
if ((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST))
mt.pt.x = (short)LOWORD(msg.lParam);
mt.pt.y = (short)HIWORD(msg.lParam);
From: wine-patches-admin at winehq.com
[mailto:wine-patches-admin at winehq.com] On Behalf Of Andrew de Quincey
Sent: Friday, 5 December 2003 8:45 AM
Subject: menu: nasty bug in menu tracking
In IDA, the menus don't work correctly... as you move down a menu, the
item is highlighted if you move to a submenu.. after that, the wrong
opened and other bad things occur.
The problem is that MSG.lParam is NOT necessarily in screen coordinates
though the comment I have removed says they are). As I can't trust the
either, this means using GetCursorPos() to determine the mouse position
BTW: MSDN says this about the MSG.lParam value for WM_MOUSEMOVED events:
lParam The low-order word specifies the x-coordinate of the cursor. The
relative to the upper-left corner of the client area.
The high-order word specifies the y-coordinate of the cursor. The
is relative to the upper-left corner of the client area.
More information about the wine-devel