天天看点

获取当前输入法

char szBuf[50];
  HKL kl ;
  kl = GetKeyboardLayout(0);
  memset(szBuf, 0x00, 50);

  ImmGetDescription(kl, szBuf, 50);

  if(String(szBuf).Length()==0)
   strcpy(szBuf,"系统默认");

  Caption = String(szBuf) ;
           

ImmGetDescription  复制IME的说明信息到指定的缓冲区中。