The WM_MOUSEMOVE message is posted to a window when the cursor moves. Mouse co-ordinates are passed through WM_MOUSEMOVE event using LPARAM. Lower word of LPARAM contains x position. Upper word contains the y position.
fwKeys = wParam; // key flags
xPos = LOWORD(lParam); // horizontal position of cursor
yPos = HIWORD(lParam); // vertical position of cursor
xPos : Value of the low-order word of lParam. Specifies the x-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
- MK_CONTROL - Set if the ctrl key is down.
- MK_LBUTTON - Set if the left mouse button is down.
- MK_MBUTTON - Set if the middle mouse button is down.
- MK_RBUTTON - Set if the right mouse button is down.
- MK_SHIFT - Set if the shift key is down.
yPos : Value of the high-order word of lParam. Specifies the y-coordinate of the cursor. The coordinate is relative to the upper-left corner of the client area.
You have viewed 1 page out of 109. Your VC++ learning is 0.00% complete. Login to check your learning progress.
Similar topics related to this section
Programming Windows, Fifth Edition (Developer Reference)
Programming Applications for Microsoft Windows (Microsoft Programming Series)
Programming Windows with MFC, Second Edition
Visual C++ Programming
Programming Microsoft Visual C++, Fifth Edition
| #1 webmaster Sun 27 Apr/2014 04:41:30(GMT) || 0 || 0|
We are pleased to inform you that a forum/blog has been incorporated with www.mybestnotes.co.in. You are welcomed to add your comments, requests, codes, solutions and feedback to it. Please login(if already a member) or signup(for free) to avail to this facility.
Your message goes here: