Answered by:
I would like to control the mouse pointer

Question
-
I want to control the mouse pointer from an App.
The user can still move the pointer but I want to augment their actions.
Is this possible? What shall I develop this app on?
Kind Regards :)
Friday, June 19, 2020 6:52 AM
Answers
-
Hi jasonbb88,
Yes, you can create a traditional Windows Desktop application (C++).
Refer: Your First Windows Program
Then monitor WM_MOUSEMOVE message.
Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.
Best regards,
Strive
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Marked as answer by jasonbb88 Friday, June 19, 2020 9:31 AM
Friday, June 19, 2020 8:47 AM -
thanks for that :)
hey, i have two questions... I apologise if they are obvious.
will my App get these messages even if the mouse is over another window?
Also, can you create this from another language, like C#?
You can control the mouse globally with a WH_MOUSE_LL hook,
in any language.
- Marked as answer by jasonbb88 Friday, June 19, 2020 10:29 AM
Friday, June 19, 2020 10:23 AM
All replies
-
Hi jasonbb88,
Yes, you can create a traditional Windows Desktop application (C++).
Refer: Your First Windows Program
Then monitor WM_MOUSEMOVE message.
Posted to a window when the cursor moves. If the mouse is not captured, the message is posted to the window that contains the cursor. Otherwise, the message is posted to the window that has captured the mouse.
Best regards,
Strive
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Marked as answer by jasonbb88 Friday, June 19, 2020 9:31 AM
Friday, June 19, 2020 8:47 AM -
thanks for that :)
hey, i have two questions... I apologise if they are obvious.
will my App get these messages even if the mouse is over another window?
Also, can you create this from another language, like C#?Friday, June 19, 2020 10:19 AM -
thanks for that :)
hey, i have two questions... I apologise if they are obvious.
will my App get these messages even if the mouse is over another window?
Also, can you create this from another language, like C#?
You can control the mouse globally with a WH_MOUSE_LL hook,
in any language.
- Marked as answer by jasonbb88 Friday, June 19, 2020 10:29 AM
Friday, June 19, 2020 10:23 AM