也就是 GetKeyNameText 这个函数的反操作!
比如我知道 A,想知道他的扫描码。再如Backspace求他的扫描码。在线等!

解决方案 »

  1.   

    试试 MapVirtualKey( UINT uCode, MAPVK_VK_TO_VSC 
      

  2.   

    MapVirtualKey是扫描码和虚拟码的转换
    不能满足LZ的键名和扫描码的转换
      

  3.   

    不行啊,我的输入参数是"A"或"Delete"之类的对应的应该是65和46
      

  4.   

    #define   VK_LBUTTON                 0x01   
      #define   VK_RBUTTON                 0x02   
      #define   VK_CANCEL                   0x03   
      #define   VK_MBUTTON                 0x04         /*   NOT   contiguous   with   L   &   RBUTTON   */   
        
      #define   VK_BACK                       0x08   
      #define   VK_TAB                         0x09   
        
      #define   VK_CLEAR                     0x0C   
      #define   VK_RETURN                   0x0D   
        
      #define   VK_SHIFT                     0x10   
      #define   VK_CONTROL                 0x11   
      #define   VK_MENU                       0x12   
      #define   VK_PAUSE                     0x13   
      #define   VK_CAPITAL                 0x14