What is the Windows Message send when the spacebar is pressed
What is the Windows Message send when the spacebar is pressed
(x) (x) the year 2010 smiley
\_____/
umm, the ASCII for space is 32
what does signature stand for?
Use this:
Or this:Code:case WM_CHAR: /* handle keyboard input */ switch ((int)wParam) { break; case VK_SPACE: /* Your code here */ break; default: break; } break;
Code:if(GetAsyncKeyState(VK_SPACE)){ /* Your code here */ }
The reason we use VK_SPACE is because different keyboard layouts could produce different outputs, so with a virtual key, windows will figure it out for us.
Sorry needed some fixing, had an extra break in the beginningCode:case WM_CHAR: /* handle keyboard input */ switch (wParam) { case VK_SPACE: /* Your code here */ break; } return 0;
Last edited by JoshR; 08-02-2005 at 11:57 AM.