Can someone tell me how to use GetLastInputInfo?

I'm asking for this because I want to make my program "catch" the latests inputs from the keyboard (no matter if its a number or ascii).

For example, I press in numpad 1, 8, 9, 5, 0, and mov that to eax (eax == 18950), how could i do that?
Posted on 2009-11-21 20:27:45 by GermainR27
If you're using some kind of input control (such as a TextBox),  it's very easy. You can grab the whole string using something like WM_GETTEXT.
If you only have a WINDOW, you can watch for WM_KEYDOWN and collect the keypresses into a string.
The last way is to POLL THE KEYBOARD YOURSELF using GetKeyboardState or GetAsyncKeyState.

Posted on 2009-11-21 20:34:37 by Homer

If you're using some kind of input control (such as a TextBox),  it's very easy. You can grab the whole string using something like WM_GETTEXT.
If you only have a WINDOW, you can watch for WM_KEYDOWN and collect the keypresses into a string.
The last way is to POLL THE KEYBOARD YOURSELF using GetKeyboardState or GetAsyncKeyState.




Well... I'm not using a window or a TextBox, so I think I should use GetKeyboardState...

Thanks Homer  ;)
Posted on 2009-11-22 10:38:44 by GermainR27