-
Mouse moving
Hello
I'm wondering if you could help me with something...i want to move the mouse in Windows from my code(to set it at specific coordinates and move it along the screen, even to click form my code) what should i use...could you explain a little for me ??
Thank you.
-
SetCursorPos will move the cursor to where you want to.
For left-button click events, handle the following messages in your window procedure:
WM_LBUTTONDOWN
WM_LBUTTONBDLCLICK
WM_LBUTTONUP
For middle-button click events handle the following messages in your window procedure:
WM_MBUTTONDOWN
WM_MBUTTONDBLCLICK
WM_MBUTTONUP
For right-button click events handle the following messages in your window procedure:
WM_RBUTTONCLICK
WM_RBUTTONDBLCLICK
WM_RBUTTONUP
For mouse movement, handle the WM_MOUSEMOVE message.
There's others; for the full list/explanation of mouse input, read it up on msdn: mouse input overview.
For cursors there's the cursors overview.