Solved

Easy - Mouse

Posted on 2003-11-18
2
307 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
2 Comments
 
LVL 2

Accepted Solution

by:
ext2 earned 20 total points
Comment Utility
#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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now