Hello :)

I'm making a very simple game in C++ (very much like the old DOS game Supaplex if anybody know that :P). I'm using the windows API, not GDI, DirectX or anything like that. I've only just begun learning the Win Api some days ago :)

I have the problem that I don't know how to check if multiple keys are pressed. I want to have that only when holding down the space key, you can do something with the arrow keys. I had tried to search the web, but I could only find something about using shift and ctrl as hotkeys. Someone know how to do this?

In short, you probably want to detect the WM_KEYDOWN message from the spacebar, and until you see the WM_KEYUP from spacebar, process other key messages.

hehe thx for the fast reply, why didn't I think of that? :P

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.