0

Hello.

Is there a way to move to the mouse cursor on the screen using C or C++?
I am using windows vista and Microsoft visual studio 2008.
I am pretty new to C so I don't know much.

I have read previous threads which said that you need to use the windows library "windows.h" though when i copied the code the whole program won't compile saying it won't find it.

Can you please maybe give me a step by step guide?

Thank's a lot.
Giora

4
Contributors
3
Replies
7
Views
8 Years
Discussion Span
Last Post by Narue
1

On windows the following code will move the mouse cursor.

#include <windows.h>

int main(void){
  SetCursorPos(50, 50);
  return 0;
}

Of course you will want to play around with that. If you want more detail just ask

Chris

-1

i want to move the cursor of mouse and select the icons using visual c++.
i m new to visual c++. can anyone help me plz ?

0

i want to move the cursor of mouse and select the icons using visual c++.
i m new to visual c++. can anyone help me plz ?

Here's an idea: read the thread you're trying to hijack. It has your answer.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.