well, i have seen the page but i could not find anything useful, there were something about reading function keys but nothing about reading reading multiple keys or different keystates.
try GetAsyncKeyState() to get the key you want. As for the arrow key problem, you shouldn't rely on windows to handle your movements. Again, use GetAsyncKeyState(). If you're just using a basic windows message loop, within your main() add a call to a function called UpdateGame() or GameLoop(), or whatever you want to call it. When your application first starts, set up a global variable to hold the milliseconds elapsed for every loop something like this:
void GameLoop()
{
UINT nSeconds = timeGetTime()
//for your object to move every tenth of a second
if((gSeconds + 100) > nSeconds)
{
gSeconds = nSeconds;
if(GetAsyncKeyState(VK_UP))
gTop += 1;
if(GetAsyncKeyState(VK_DOWN))
gTop -= 1;
if(GetAsyncKeyState(VK_LEFT))
gLeft -= 1;
if(GetAsyncKeyState(VK_RIGHT))
gLeft += 1;
}
//do some type of update to your object's drawn position
m_Object.UpdatePosition(gLeft,gTop);
}
Having a function like this is how most games are done, but in the application's message loop, it's only done if the msg is WM_IDLE so that your game only uses idle time to update the game. you won't see any performance hits in your game, and it will allow for other events to transpire. Hope this helps. (this isn't the most efficient algorithm in the world, or the best, but I just put it together :lol: )