简体   繁体   中英

How do I store key-strokes?

I have an empty win32 project.

CASE WM_CHAR:

under this case I need to store each keystroke in an array, then output it to the screen using

TextOut();

I figured it's going to be something like this:

char store[LARGE_NUMBER];

then under the case wm_char header I store the character in store then use a counter to move along the array for each key which is pressed. I just don't know how to record a specific key on the keyboard, not just any key - which calls the wm_char case.

Thanks

The wParam parameter holds the character code of the key that was pressed. Take a look at the documentation . lParam holds further information about the key press (was it a special key, was the key held down etc.).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM