MFC determines that the current input method is Chinese input method

HKL hkl = GetKeyboardLayout(0);
if(ImmIsIME(hkl))
    AfxMessageBox("当前是中文输入法");

Need to include header files and link libraries

#include <imm.h>//ImmIsIME


#pragma comment(lib, "imm32.lib.")

 

Guess you like

Origin blog.csdn.net/yangkunhenry/article/details/102985204