Solved

Easy - Mouse

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

707 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