请问怎么在程序中获得任意一个字符或功能键的扫描码?、请高手指点!!~~~~

解决方案 »

  1.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=200472
      

  2.   

    那是汉字的啊,看的不太明白
    可不可以直接从ASC2码或虚拟键码转化为扫描码的??
      

  3.   

    CWnd::OnKeyDown
    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, 可以得到一个扫描码的列表的.