Add the WM_KEYUP and WM_KEYDOWN cases to process keystrokes. Add the following statements to the window function:
case WM_KEYDOWN:
wsprintf(KeyboardText, “WM_KEYDOWN: %x, %x, %x”,
wParam, LOWORD(lParam), HIWORD(lParam));
InvalidateRect(hWnd, &rectKeyboard, TRUE);
break;
case WM_KEYUP:
wsprintf(KeyboardText, “WM_KEYUP: %x, %x, %x”,
wParam, LOWORD(lParam), HIWORD(lParam));
InvalidateRect(hWnd, &rectKeyboard, TRUE);
break;