In the following code, mouseMove is sent the label, and the x,y coridinates of the cursor. But if you hold the cursor down and, while holding the cursor down, move it to the corners of your screen, you will get invalid $x, $y values..

This looks to me as is Win32::GUI is sending the wrong mouse coordinates. Is this a bug or do I not understand something?

The large values are basically negitive values (subtracting 65535 when large will give the correct negitive value). It looks like this is a bug, and have created a tracker item:

http://sourceforge.net/tracker/index.php?func=detail&aid=1262098&group_id=16572&atid=116572

It seems we should be using:

xPos = GET_X_LPARAM(lParam);
yPos = GET_Y_LPARAM(lParam);

Rather than:

xPos = LOWORD(lParam),
xPos = HIWORD(lParam),

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/mouseinput/mouseinputreference/mouseinputmessages/wm_mousemove.asp

Cheers,

jez.



Reply via email to