Mouse Programming

closed account (EAUX92yv)
I am trying to design a text-based game in which you click on the choice you wish to select. Can someone please explain to me how to implement mouse clicks in certain areas on the screen? Any help is appreciated.
what os do you have
closed account (EAUX92yv)
I do not know what an os is. Please explain to me what it is.
closed account (EAUX92yv)
my os is windows 7 home premium 64 bit
try win32
Either use PDCurses or use the Win32 Console functions. You will have to enable mouse input with SetConsoleMode() at the beginning of your program.

You will also have to wait on input and react to its type (keyboard or mouse) now instead of just using cin or fgets() and the like. The Windows API function to wait is WaitForSingleObject().

http://pdcurses.sourceforge.net/
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

http://www.google.com/search?btnI=1&q=msdn+console+functions
http://www.google.com/search?btnI=1&q=msdn+waitforsingleobject

If you google around my name and these functions I'm sure you can find some good examples.

Either way, you have a lot of learning to do. Good luck!
Topic archived. No new replies allowed.