Solved

Easy - Mouse

Posted on 2003-11-18
2
310 Views
Last Modified: 2010-04-02
Can someone show me an example of a statement\function and how to use it, which would move the mouse to a point on the screen when teh command was run.

(and any libires i need)
thank you.
0
Comment
Question by:FatNewbie
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
ext2 earned 20 total points
ID: 9775616
#include <windows.h>

int main()
{
    SetCursorPos(10,10);   // move mouse cursor to x=10, y=10

    return 0;
);
0
 
LVL 2

Expert Comment

by:MirkoLMV
ID: 9801084
Every C++ implementation has it's own functions for handling mouse input.
For WinAPI there is quite a chapter at  msdn.microsoft.com/library  about mouse input, with a lot of information and a few interesting examples.

Good luck !
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question