key codes in VC++

Started by
3 comments, last by Jimbo 24 years, 1 month ago
In VC++, what is the key codes for the backspace, enter and the numeral (1-9) keys? Since space is WM_SPACE, I thought enter for an example could be WM_ENTER... but nooooo.. :-) Thanks!
Advertisement
I don''t remember the name of the file that has all of that information, but if you do a find file search on your include directory, looking for WM_SPACE in all of the .h files, you should find it without much trouble.
To capture windows keypress messages, handle the WM_CHAR or WM_KEYDOWN messages. in these message handlers, the WParam holds the key code, I believe. (check the docco''s to make sure)

In the handler, test for VK_ENTER, VK_BACK_SPACE, and VK_NUMPAD0 ... VK_NUMPAD9, and take appropriate action.




*oof*
*oof*
I thought that the vk code for the enter button was VK_RETURN maybe Im just tired
I searched the h-files and found what I needed in one of them. I have the "learning edition" of vc++ and the docs to it are kinda messed up, so I can''t get much out of them! Thanks for your help

This topic is closed to new replies.

Advertisement