getting mouse pos and sending the user to a website in C++

Programming, for all ages and all languages.
Post Reply
Scarberry

getting mouse pos and sending the user to a website in C++

Post by Scarberry »

how can i get the mouse (x,y) in c++?

how can i send the user to a website in C++?


thanks
Tim

Re:getting mouse pos and sending the user to a website in C+

Post by Tim »

In C++, you can't. In C++ code on a particular operating system, you can.

On Windows: GetCursorPos and ShellExecute(your_url).
Scarberry

Re:getting mouse pos and sending the user to a website in C+

Post by Scarberry »

thanks for all 3 qs
scarberry

Re:getting mouse pos and sending the user to a website in C+

Post by scarberry »

hey im having a problem getting GetMousePos to work. could u post a simple example of putting the mouse x and y on the console screen.

thanks
Tim

Re:getting mouse pos and sending the user to a website in C+

Post by Tim »

1. Use GetCursorPos, not GetMousePos
2. Go to http://msdn.microsoft.com/library/ for all the information you could ever need.
scarberry

Re:getting mouse pos and sending the user to a website in C+

Post by scarberry »

lol oops. thank you i got it working now.
Post Reply