Link to home
Start Free TrialLog in
Avatar of MAnkeer
MAnkeer

asked on

GetCursorPos Function

Dear Guys.

I want to capture the MouseMove and WM_LBUTTONUP Messages in WindowsCE platform, inside these messages I used the GetCursorPos function to get the mouse cursor function, the main problem that this function always returns 0, which means that the function is failed, when I used the GetLast Error, I find that the error code is 120, when I look for the this code in MSDN, MSDN tells me that this error means "This function is not valid on this platform. ", Now I need to get the position of the mouse cursor using another function, So how I can I do that in Windows CE ?


Thank you in advance.
Avatar of AlexFM
AlexFM

Both WM_LBUTTONUP and WM_MOUSEMOVE messages contain cursor coordinate in lParam parameter:

The low-order word specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
The high-order word specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
Avatar of MAnkeer

ASKER

Thank you.


But I want to get the Stylus coordinates when it out of my window.

Thank you.
ASKER CERTIFIED SOLUTION
Avatar of lakshman_ce
lakshman_ce

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial