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

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

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 ?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.