Two things for clarity;
1. PeekMessage() will return imediately from the msg que, GetMessge() will wait in the que until a message arrives.
So PeekMessage() is used in (game) loops where the main task is not just getting user input.
2. GetAsyncKeyState() gets the current state of the key. The message may not yet have been posted to the que so beware you do not process a second time.
GetKeyboardState() will get all the keys. and record the results into an array. the array can then be indexed by the VK_ key codes ie
Code:BYTE byteKeyArray[256]; GetKeyboardState(&byteKeyArray); UpdateShip(byteKeyArray[VK_UP], byteKeyArray[VK_DOWN], ect );