求VC中将virtual key(虚拟键盘码)转化为字符的函数,
我只取得了其虚拟键盘码,想把它转化为字符,无奈MSDN太大,无从找起
还望哪位大侠指点,感激不尽!!!

解决方案 »

  1.   

    哦,可以用这个:
    UINT MapVirtualKey(
        UINT uCode, // virtual-key code or scan code
        UINT uMapType  // translation to perform
    MapVirtualKey(0x40,2)  表示从Virtual->char2 uCode is a virtual-key code and is translated into an unshifted character value in the low-order word of the return value. Dead keys (diacritics) are indicated by setting the top bit of the return value. If there is no translation, the function returns 0.