求救,在VC编程中F1-F12的键值信息是什么?

shashengduguzhe 2003-10-09 10:38:41
本人用VC编制一应用程序想通过捕捉F1-F12的按键信息,并通过该信息设定一功能.有谁知道这12个按键的信息.解决后高分奉送,谢谢.
...全文
485 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
duyhui 2003-10-09
  • 打赏
  • 举报
回复
在WM_KEYDOWN消息里,设个断点,依次按下F1-F12,就能看见是什么值了。
vcforever 2003-10-09
  • 打赏
  • 举报
回复
VK_F1,VK_F2,...VK_F12
lshadow 2003-10-09
  • 打赏
  • 举报
回复
VK_F1,VK_F2,...VK_F12
hanwg 2003-10-09
  • 打赏
  • 举报
回复
VK_F1,VK_F2,...VK_F12
cymlife 2003-10-09
  • 打赏
  • 举报
回复
WM_KEYDOWN消息里,设个断点,按一下Fx,再看看它的值嘛
lzwcom 2003-10-09
  • 打赏
  • 举报
回复
VK_F1,VK_F2,...VK_F12
abc_rain 2003-10-09
  • 打赏
  • 举报
回复
VK_0
VK_0 through VK_9 are the same as ASCII "0" through "9" (0x30 - 0x39).
VK_1
A virtual key code for the ASCII "1" key.
VK_2
A virtual key code for the ASCII "2" key.
VK_3
A virtual key code for the ASCII "3" key.
VK_4
A virtual key code for the ASCII "4" key.
VK_5
A virtual key code for the ASCII "5" key.
VK_6
A virtual key code for the ASCII "6" key.
VK_7
A virtual key code for the ASCII "7" key.
VK_8
A virtual key code for the ASCII "8" key.
VK_9
A virtual key code for the ASCII "9" key.
VK_A
VK_A through VK_Z are the same as ASCII "A" through "Z" (0x41 - 0x5A).
VK_ACCEPT
For Asian keyboards.
VK_ADD
A virtual key code for the numeric keypad PLUS SIGN (+) key.
VK_ALT
A virtual key code for the ALT key.
VK_B
A virtual key code for the ASCII "B" key.
VK_BACK_QUOTE
A virtual key code for the apostrophe (`) key.
VK_BACK_SLASH
A virtual key code for the BACKSLASH (\) key.
VK_BACK_SPACE
A virtual key code for the BACKSPACE key.
VK_C
A virtual key code for the ASCII "C" key.
VK_CANCEL
A virtual key code for the CANCEL key.
VK_CAPS_LOCK
A virtual key code for the CAPS LOCK key.
VK_CLEAR
A virtual key code for the CLEAR key.
VK_CLOSE_BRACKET
A virtual key code for the CLOSE BRACKET (]) key.
VK_COMMA
A virtual key code for the COMMA (,) key.
VK_CONTROL
A virtual key code for the CTRL key.
VK_CONVERT
For Asian keyboards.
VK_D
A virtual key code for the ASCII "D" key.
VK_DECIMAL
A virtual key code for the numeric keypad DECIMAL POINT (.) key.
VK_DELETE
A virtual key code for the DELETE key.
VK_DIVIDE
A virtual key code for the numeric keypad DIVISION (/) key.
VK_DOWN
A virtual key code for the DOWN ARROW key.
VK_E
A virtual key code for the ASCII "E" key.
VK_END
A virtual key code for the END key.
VK_ENTER
A virtual key code for the ENTER key.
VK_EQUALS
A virtual key code for the EQUAL SIGN (=) key.
VK_ESCAPE
A virtual key code for the ESC key.
VK_F
A virtual key code for the ASCII "F" key.
VK_F1
A virtual key code for the F1 key.
VK_F10
A virtual key code for the F10 key.
VK_F11
A virtual key code for the F11 key.
VK_F12
A virtual key code for the F12 key.
VK_F2
A virtual key code for the F2 key.
VK_F3
A virtual key code for the F3 key.
VK_F4
A virtual key code for the F4 key.
VK_F5
A virtual key code for the F5 key.
VK_F6
A virtual key code for the F6 key.
VK_F7
A virtual key code for the F7 key.
VK_F8
A virtual key code for the F8 key.
VK_F9
A virtual key code for the F9 key.
VK_FINAL
For Asian keyboards.
VK_G
A virtual key code for the ASCII "G" key.
VK_H
A virtual key code for the ASCII "H" key.
VK_HELP
A virtual key code for the HELP key.
VK_HOME
A virtual key code for the HOME key.
VK_I
A virtual key code for the ASCII "I" key.
VK_INSERT
A virtual key code for the INSERT key.
VK_J
A virtual key code for the ASCII "J" key.
VK_K
A virtual key code for the ASCII "K" key.
VK_KANA
For Asian keyboards.
VK_KANJI
For Asian keyboards.
VK_L
A virtual key code for the ASCII "L" key.
VK_LEFT
A virtual key code for the LEFT ARROW key.
VK_M
A virtual key code for the ASCII "M" key.
VK_META
A virtual key code for the Application key (found on Microsoft® Windows® 95 keyboards).
VK_MODECHANGE
For Asian keyboards.
VK_MULTIPLY
A virtual key code for the numeric keypad MULTIPLICATION (*) key.
VK_N
A virtual key code for the ASCII "N" key.
VK_NONCONVERT
For Asian keyboards.
VK_NUM_LOCK
A virtual key code for the NUM LOCK key.
VK_NUMPAD0
A virtual key code for the numeric keypad "0" key.
VK_NUMPAD1
A virtual key code for the numeric keypad "1" key.
VK_NUMPAD2
A virtual key code for the numeric keypad "2" key.
VK_NUMPAD3
A virtual key code for the numeric keypad "3" key.
VK_NUMPAD4
A virtual key code for the numeric keypad "4" key.
VK_NUMPAD5
A virtual key code for the numeric keypad "5" key.
VK_NUMPAD6
A virtual key code for the numeric keypad "6" key.
VK_NUMPAD7
A virtual key code for the numeric keypad "7" key.
VK_NUMPAD8
A virtual key code for the numeric keypad "8" key.
VK_NUMPAD9
A virtual key code for the numeric keypad "9" key.
VK_O
A virtual key code for the ASCII "O" key.
VK_OPEN_BRACKET
A virtual key code for the OPEN BRACKET ([) key.
VK_P
A virtual key code for the ASCII "P" key.
VK_PAGE_DOWN
A virtual key code for the PAGE DOWN key.
VK_PAGE_UP
A virtual key code for the PAGE UP key.
VK_PAUSE
A virtual key code for the PAUSE (BREAK) key.
VK_PERIOD
A virtual key code for the PERIOD (.) key.
VK_PRINTSCREEN
A virtual key code for the PRINT SCREEN key.
VK_Q
A virtual key code for the ASCII "Q" key.
VK_QUOTE
A virtual key code for the QUOTATION MARK key.
VK_R
A virtual key code for the ASCII "R" key.
VK_RIGHT
A virtual key code for the RIGHT ARROW key.
VK_S
A virtual key code for the ASCII "S" key.
VK_SCROLL_LOCK
A virtual key code for the SCROLL LOCK key.
VK_SEMICOLON
A virtual key code for the SEMICOLON (;) key.
VK_SEPARATER
VK_SHIFT
A virtual key code for the SHIFT key.
VK_SLASH
A virtual key code for the forward slash (/) key.
VK_SPACE
A virtual key code for the SPACEBAR key.
VK_SUBTRACT
A virtual key code for the numeric keypad MINUS SIGN (-) key.
VK_T
A virtual key code for the ASCII "T" key.
VK_TAB
A virtual key code for the TAB key.
VK_U
A virtual key code for the ASCII "U" key.
VK_UNDEFINED
KEY_TYPED events do not have a defined key code.
VK_UP
A virtual key code for the UP ARROW key.
VK_V
A virtual key code for the ASCII "V" key.
VK_W
A virtual key code for the ASCII "W" key.
VK_X
A virtual key code for the ASCII "X" key.
VK_Y
A virtual key code for the ASCII "Y" key.
VK_Z
A virtual key code for the ASCII "Z" key.
alon21 2003-10-09
  • 打赏
  • 举报
回复
VK_F1 .......VK_F12
Paris_Luo 2003-10-09
  • 打赏
  • 举报
回复
VK_F1-VKF12
yaoha2003 2003-10-09
  • 打赏
  • 举报
回复
abc_rain() 强
windows_editor 2003-10-09
  • 打赏
  • 举报
回复
Virtual-Key Codes
The following table shows the symbolic constant names, hexadecimal values, and mouse or keyboard equivalents for the virtual-key codes used by the system. The codes are listed in numeric order.

Symbolic constant name Value
(hexadecimal) Mouse or keyboard equivalent
VK_LBUTTON 01 Left mouse button
VK_RBUTTON 02 Right mouse button
VK_CANCEL 03 Control-break processing
VK_MBUTTON 04 Middle mouse button (three-button mouse)
VK_XBUTTON1 05 Windows 2000 or later: X1 mouse button
VK_XBUTTON2 06 Windows 2000 or later: X2 mouse button
— 07 Undefined
VK_BACK 08 BACKSPACE key
VK_TAB 09 TAB key
— 0A–0B Reserved
VK_CLEAR 0C CLEAR key
VK_RETURN 0D ENTER key
— 0E–0F Undefined
VK_SHIFT 10 SHIFT key
VK_CONTROL 11 CTRL key
VK_MENU 12 ALT key
VK_PAUSE 13 PAUSE key
VK_CAPITAL 14 CAPS LOCK key
VK_KANA 15 IME Kana mode
VK_HANGUEL 15 IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
VK_HANGUL 15 IME Hangul mode
— 16 Undefined
VK_JUNJA 17 IME Junja mode
VK_FINAL 18 IME final mode
VK_HANJA 19 IME Hanja mode
VK_KANJI 19 IME Kanji mode
— 1A Undefined
VK_ESCAPE 1B ESC key
VK_CONVERT 1C IME convert
VK_NONCONVERT 1D IME nonconvert
VK_ACCEPT 1E IME accept
VK_MODECHANGE 1F IME mode change request
VK_SPACE 20 SPACEBAR
VK_PRIOR 21 PAGE UP key
VK_NEXT 22 PAGE DOWN key
VK_END 23 END key
VK_HOME 24 HOME key
VK_LEFT 25 LEFT ARROW key
VK_UP 26 UP ARROW key
VK_RIGHT 27 RIGHT ARROW key
VK_DOWN 28 DOWN ARROW key
VK_SELECT 29 SELECT key
VK_PRINT 2A PRINT key
VK_EXECUTE 2B EXECUTE key
VK_SNAPSHOT 2C PRINT SCREEN key
VK_INSERT 2D INS key
VK_DELETE 2E DEL key
VK_HELP 2F HELP key
30 0 key
31 1 key
32 2 key
33 3 key
34 4 key
35 5 key
36 6 key
37 7 key
38 8 key
39 9 key
— 3A–40 Undefined
41 A key
42 B key
43 C key
44 D key
45 E key
46 F key
47 G key
48 H key
49 I key
4A J key
4B K key
4C L key
4D M key
4E N key
4F O key
50 P key
51 Q key
52 R key
53 S key
54 T key
55 U key
56 V key
57 W key
58 X key
59 Y key
5A Z key
VK_LWIN 5B Left Windows key (Microsoft® Natural® keyboard)
VK_RWIN 5C Right Windows key (Natural keyboard)
VK_APPS 5D Applications key (Natural keyboard)
— 5E Reserved
VK_SLEEP 5F Computer Sleep key
VK_NUMPAD0 60 Numeric keypad 0 key
VK_NUMPAD1 61 Numeric keypad 1 key
VK_NUMPAD2 62 Numeric keypad 2 key
VK_NUMPAD3 63 Numeric keypad 3 key
VK_NUMPAD4 64 Numeric keypad 4 key
VK_NUMPAD5 65 Numeric keypad 5 key
VK_NUMPAD6 66 Numeric keypad 6 key
VK_NUMPAD7 67 Numeric keypad 7 key
VK_NUMPAD8 68 Numeric keypad 8 key
VK_NUMPAD9 69 Numeric keypad 9 key
VK_MULTIPLY 6A Multiply key
VK_ADD 6B Add key
VK_SEPARATOR 6C Separator key
VK_SUBTRACT 6D Subtract key
VK_DECIMAL 6E Decimal key
VK_DIVIDE 6F Divide key
VK_F1 70 F1 key
VK_F2 71 F2 key
VK_F3 72 F3 key
VK_F4 73 F4 key
VK_F5 74 F5 key
VK_F6 75 F6 key
VK_F7 76 F7 key
VK_F8 77 F8 key
VK_F9 78 F9 key
VK_F10 79 F10 key
VK_F11 7A F11 key
VK_F12 7B F12 key
VK_F13 7C F13 key
VK_F14 7D F14 key
VK_F15 7E F15 key
VK_F16 7F F16 key
VK_F17 80H F17 key
VK_F18 81H F18 key
VK_F19 82H F19 key
VK_F20 83H F20 key
VK_F21 84H F21 key
VK_F22 85H F22 key
VK_F23 86H F23 key
VK_F24 87H F24 key
— 88–8F Unassigned
VK_NUMLOCK 90 NUM LOCK key
VK_SCROLL 91 SCROLL LOCK key
92–96 OEM specific
— 97–9F Unassigned
VK_LSHIFT A0 Left SHIFT key
VK_RSHIFT A1 Right SHIFT key
VK_LCONTROL A2 Left CONTROL key
VK_RCONTROL A3 Right CONTROL key
VK_LMENU A4 Left MENU key
VK_RMENU A5 Right MENU key
VK_BROWSER_BACK A6 Windows 2000 or later: Browser Back key
VK_BROWSER_FORWARD A7 Windows 2000 or later: Browser Forward key
VK_BROWSER_REFRESH A8 Windows 2000 or later: Browser Refresh key
VK_BROWSER_STOP A9 Windows 2000 or later: Browser Stop key
VK_BROWSER_SEARCH AA Windows 2000 or later: Browser Search key
VK_BROWSER_FAVORITES AB Windows 2000 or later: Browser Favorites key
VK_BROWSER_HOME AC Windows 2000 or later: Browser Start and Home key
VK_VOLUME_MUTE AD Windows 2000 or later: Volume Mute key
VK_VOLUME_DOWN AE Windows 2000 or later: Volume Down key
VK_VOLUME_UP AF Windows 2000 or later: Volume Up key
VK_MEDIA_NEXT_TRACK B0 Windows 2000 or later: Next Track key
VK_MEDIA_PREV_TRACK B1 Windows 2000 or later: Previous Track key
VK_MEDIA_STOP B2 Windows 2000 or later: Stop Media key
VK_MEDIA_PLAY_PAUSE B3 Windows 2000 or later: Play/Pause Media key
VK_LAUNCH_MAIL B4 Windows 2000 or later: Start Mail key
VK_LAUNCH_MEDIA_SELECT B5 Windows 2000 or later: Select Media key
VK_LAUNCH_APP1 B6 Windows 2000 or later: Start Application 1 key
VK_LAUNCH_APP2 B7 Windows 2000 or later: Start Application 2 key
— B8-B9 Reserved
VK_OEM_1 BA Windows 2000 or later: For the US standard keyboard, the ';:' key
VK_OEM_PLUS BB Windows 2000 or later: For any country/region, the '+' key
VK_OEM_COMMA BC Windows 2000 or later: For any country/region, the ',' key
VK_OEM_MINUS BD Windows 2000 or later: For any country/region, the '-' key
VK_OEM_PERIOD BE Windows 2000 or later: For any country/region, the '.' key
VK_OEM_2 BF Windows 2000 or later: For the US standard keyboard, the '/?' key
VK_OEM_3 C0 Windows 2000 or later: For the US standard keyboard, the '`~' key
— C1–D7 Reserved
— D8–DA Unassigned
VK_OEM_4 DB Windows 2000 or later: For the US standard keyboard, the '[{' key
VK_OEM_5 DC Windows 2000 or later: For the US standard keyboard, the '\|' key
VK_OEM_6 DD Windows 2000 or later: For the US standard keyboard, the ']}' key
VK_OEM_7 DE Windows 2000 or later: For the US standard keyboard, the 'single-quote/double-quote' key
VK_OEM_8 DF
— E0 Reserved
E1 OEM specific
VK_OEM_102 E2 Windows 2000 or later: Either the angle bracket key or the backslash key on the RT 102-key keyboard
E3–E4 OEM specific
VK_PROCESSKEY E5 Windows 95/98, Windows NT 4.0, Windows 2000 or later: IME PROCESS key
E6 OEM specific
VK_PACKET E7 Windows 2000 or later: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
— E8 Unassigned
E9–F5 OEM specific
VK_ATTN F6 Attn key
VK_CRSEL F7 CrSel key
VK_EXSEL F8 ExSel key
VK_EREOF F9 Erase EOF key
VK_PLAY FA Play key
VK_ZOOM FB Zoom key
VK_NONAME FC Reserved for future use
VK_PA1 FD PA1 key
VK_OEM_CLEAR FE Clear key
ljlln 2003-10-09
  • 打赏
  • 举报
回复
为什么不自己试试那?
kink 2003-10-09
  • 打赏
  • 举报
回复
h70 ...... h7b
shashengduguzhe 2003-10-09
  • 打赏
  • 举报
回复
多谢各位.

16,470

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧