请问怎么在程序中获得任意一个字符或功能键的扫描码?、请高手指点!!~~~~
解决方案 »
- VC 浏览器静音问题
- 为什么这样得到64?
- 这个问题对大侠来说,可能没一点水平~还请看看
- 有关CStringFormat函数的问题!!
- 如何在CEDITVIEW下设置字体颜色
- MFC中如何打开一个.chm文件呢? zzZ
- 如何用API实现超类化
- SendMessage PostMessage ??????? (高手帮忙)
- 困扰多日的问题:IHTMLElement * pElement->get_innerHTML(&bstr),为什么调试显示bstr错误的指针(0x000000)
- 据说是国内最权威的职业测评,你也来测试一下吧
- 求助:用户注销再登陆后NT服务程序出错(和网络有关)
- 修改别人代码遇到的问题
可不可以直接从ASC2码或虚拟键码转化为扫描码的??
This method is called by the framework when a nonsystem key is pressed. A nonsystem key is a keyboard key that is pressed when the ALT key is not pressed or a keyboard key that is pressed when CWnd has the input focus. afx_msg void OnKeyDown(
UINT nChar,
UINT nRepCnt,
UINT nFlags );
Parameters
nChar
Specifies the virtual key code of the given key. For a list of standard virtual key codes, see Winuser.h
nRepCnt
Specifies the repeat count, that is, the number of times the keystroke is repeated as a result of the user holding down the key.
nFlags
Specifies the scan code, key-transition code, previous key state, and context code, as shown in the following list: 这个是虚拟码, 在msdn里查scan codes, 可以得到一个扫描码的列表的.