two buttons at the same time
In my programm iam using a switch statment like you see in my code below. The problem is that i can only press one key, when i press both nothing happents... can anyone help me
? iam want to be able to press both buttens in at the same time.
LRESULT CALLBACK
WindowProc(HWND hWnd, unsigned uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_DESTROY:
Cleanup();
PostQuitMessage(0);
break;
case WM_KEYDOWN:
switch (wParam)
{
case VK_LEFT:
if (move_rate>-300.0) move_rate-=60.0;
break;
case VK_UP:
if(y_pos-5 > 0) y_pos=y_pos-5;
break;
case VK_ESCAPE:
DestroyWindow(hWnd);
break;
default:
break;
}
default:
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
return 0L;
}