It is necessary that the program, running in the background, while holding the LMB, move the cursor. Tell me, how and with the help of what to do on MS Windows?
1 answer
You will need WinAPI, the language itself does not represent such means.
To read / write the cursor position, use GetCursorPos / SetCursorPos .
In order to find out when the left mouse button is pressed in your application, you need to process the window messages WM_LBUTTONDOWN and WM_LBUTTONUP ( documentation ) in your window procedure.
If you want to process other people's applications, you need to install a hook, for more details see this answer .
|