Hello!
I want to make a simple game like this:
[IMG]http://img340.imageshack.us/img340/6393/gamea.jpg[/IMG]
So I need to start by moving the rectangles. Now I want to make an option for player VS player.
I need to somehow check what keys are in "key down" state. How can I do that?
(I'm using visual C++)

Thanks!

Check out your help index for "Virtual Keys" or "Virtual Keyboard". If you have nothing there, go to the MSDN library - it is definitely there, with an example program, as well.

Minor woops! on my above post. Virtual Keys detects key presses, but if you want to know if a key is being HELD down or not, you need getasynckeystate. Also at the MSDN library.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.