Thread: Mouse position

Results 1 to 3 of 3
  1. #1
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed

    Mouse position

    Hello, the title says all!, Im looking into how to change mouse position

    I alredy managed to get the X Y positions

    Code:
    POINT p;
    
    	GetCursorPos(&p);
    	std::cout << "Mouse X posittion: " << p.x  << std::endl;
    	std::cout << "Mouse Y posittion: " << p.y << std::endl;
    I looked up for SendInput but never undernstood it

    Thanks

  2. #2

  3. The Following User Says Thank You to Void For This Useful Post:

    Hell_Demon (12-27-2012)

  4. #3
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    My first thought was SetCursorPos also.

    pinvoke.net: mouse_event (user32) works too, but is more complex. you can do more than just set position (ie. click)
    Last edited by abuckau907; 12-27-2012 at 12:57 PM.

Similar Threads

  1. [Tutorial] How to get Mouse positions
    By soi0 in forum Vindictus Tutorials
    Replies: 8
    Last Post: 06-16-2011, 02:19 AM
  2. [Release] xD Mouse Position Recorder
    By Hassan in forum Visual Basic Programming
    Replies: 8
    Last Post: 05-30-2010, 12:46 AM
  3. [Help]Mouse Position coordinates
    By Unkn0wn_h4cker in forum Visual Basic Programming
    Replies: 9
    Last Post: 03-12-2010, 01:29 PM
  4. Set form position to mouse coordinates?
    By Lolland in forum Visual Basic Programming
    Replies: 13
    Last Post: 10-16-2009, 10:24 PM
  5. Replies: 15
    Last Post: 10-19-2006, 05:27 PM