How to record the coordinates of a mouse click as a variable?

Intro: I'm very new to C++ programming, but I hope I'm not a noob at it for too long, I'm really trying to learn. I'm trying to create my first program from an idea I came up with, but I need some help. I don't want anyone to write the code for me (I wouldn't learn much that way), but I could really use some snippets or reference help!

OS: Windows XP.

My Idea: I want my program to contain a very simple GUI that will run behind other windows. I want to be able to press a series of keyboard keys to let the program know I'm about to click the mouse, and I want it to record the coordinates as a variable (i.e. shift + W). I want the program to be able to remember as many of these variables as possible (maximum should be the amount of keys on the keyboard, including numbers, function keys, etc.). If I used Shift + W to set that coordinate variable, I want the W key to make the program click at that coordinate. If I need to type something without the key clicking the coordinate, I want to be able to hit Escape to temporarily pause the program, or put it in an inactive state, then hit Escape again to reactivate the program.

The first thing I need help with: Like I said, I don't want anyone to do all the work for me, I wouldn't learn anything that way. However, I have no idea how to go about all of this. It would help if someone would hint to me which #include's I'm going to need, and also help me figure out some different options for finding the mouse coordinates, asking user input to set a variable, executing a mouse click, etc.

Thank you so much in advanced for any help! :) I tried to keep this as clear as possible, but if there's something you don't understand about my question I'll try to clarify even more for you!
Last edited on
Topic archived. No new replies allowed.