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?
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?
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.
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.
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 ;)