| | |
Moving the mouse cursor
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jan 2009
Posts: 3
Reputation:
Solved Threads: 0
Hello.
Is there a way to move to the mouse cursor on the screen using C or C++?
I am using windows vista and Microsoft visual studio 2008.
I am pretty new to C so I don't know much.
I have read previous threads which said that you need to use the windows library "windows.h" though when i copied the code the whole program won't compile saying it won't find it.
Can you please maybe give me a step by step guide?
Thank's a lot.
Giora
Is there a way to move to the mouse cursor on the screen using C or C++?
I am using windows vista and Microsoft visual studio 2008.
I am pretty new to C so I don't know much.
I have read previous threads which said that you need to use the windows library "windows.h" though when i copied the code the whole program won't compile saying it won't find it.
Can you please maybe give me a step by step guide?
Thank's a lot.
Giora
On windows the following code will move the mouse cursor. Of course you will want to play around with that. If you want more detail just ask
Chris
C++ Syntax (Toggle Plain Text)
#include <windows.h> int main(void){ SetCursorPos(50, 50); return 0; }
Chris
Knowledge is power -- But experience is everything
![]() |
Similar Threads
- no control over mouse - virus??? (Viruses, Spyware and other Nasties)
- Sensing the mouse's movement (Visual Basic 4 / 5 / 6)
- control mouse and keyboard (C#)
- The Amazing Bouncing Cursor (Windows NT / 2000 / XP)
- One of your disks needs to be checked for consistency...blah blah.. (Windows NT / 2000 / XP)
- Fast mouse moves = wrong direction of cursor (USB Devices and other Peripherals)
- problems with logictech mice (USB Devices and other Peripherals)
- mouse constantly drifts to the left side of screen (Windows NT / 2000 / XP)
- Mouse Moving? (Windows 95 / 98 / Me)
- Set Accessibility Features for People Who are Blind or Who Have Low Vision in WinXP (Windows tips 'n' tweaks)
Other Threads in the C++ Forum
- Previous Thread: comments please
- Next Thread: (very) simple math not working perhaps due to to large numbers?
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data database delete desktop developer directshow dll download dynamic encryption error file forms fstream function functions game generator getline givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





