Solved

Easy - Mouse

Posted on 2003-11-18
2
308 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
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

777 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