none
API 函数ImmGetDescription取不到微软输入法Microsoft Office IME 2007的相关描述,输入法是日文的 RRS feed

  • 问题

  • 本人提供的代码:

        HKL m_lLayoutHandle = GetKeyboardLayout(0);
        HWND m_lTargetWindow = hDlg;

        //REGISTERWORD tRegWord;
        //tRegWord.lpReading = TEXT("");
        //tRegWord.lpWord = TEXT("123456789");
        //ImmConfigureIME(m_lLayoutHandle, m_lTargetWindow, IME_CONFIG_REGISTERWORD, &tRegWord);

        

        //GUITHREADINFO Gti;
        //::ZeroMemory ( &Gti,sizeof(GUITHREADINFO));
        //Gti.cbSize = sizeof( GUITHREADINFO );
        //::GetGUIThreadInfo(0,&Gti);
        //DWORD dwThread = ::GetWindowThreadProcessId(Gti.hwndActive,0);
        //HKL lang = ::GetKeyboardLayout(dwThread);

        TCHAR szImeFileName[64];
        DWORD dwResult = ImmGetDescription(lang, szImeFileName, 64);
        MessageBox(hDlg,(LPCTSTR)(szImeFileName),TEXT("OK"),0);

        对于有一些输入法,能正常取得输入法的名称,如Google输入法,但是对于IME系列的输入法就取出来是乱码。本人还有一个问题,微软TSF架构下的输入法,如何取得当前系统正在使用的输入法的名称,求高手啊!!!!!!



    2013年12月3日 6:27

全部回复

  • 求高手啊,急急急
    2013年12月3日 8:30
  • 这论坛里面难道没有高手了吗,小弟真心求指导,求大神
    2013年12月4日 8:16
  • 你好,

    请查看下面的链接内容,其中有解决方案。

    Description of the Input Method Editor (Japanese) 2007 hotfix package: June 20, 2007

    http://support.microsoft.com/kb/938574/en-us

    希望对你有帮助!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2013年12月4日 8:44
  • Thanks
    2013年12月4日 8:46
  • Well,to a programmer ,it is not quite useful,to be honest
    2013年12月4日 8:49
  • I must get a method to get the name or description of  the input method that using by coding other than by improving the input method
    2013年12月4日 8:54
  • Hello,

    According to your code snippet, it seems that you didn't allocate space for the buffer(szImeFileName). Also, did you set the character set as unicode or multi-byte? If possible, could you please provide a reproduce project for us? You can upload the project here. We will be very glad to help you.

    Best Regards!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2013年12月5日 6:32
  • I've allocate space for the buffer(szImeFileName) and the space is enough to hold the name of an input method,it worls well when the input method when it is in the situation of IME 2002 Or Google input Method.

    TCHAR szImeFileName[64];

    I don't have to allocate again.

    2013年12月9日 9:21
  • Hi,

    Please check if the character set is unicode of your project properties. And try to use GetKeyboardLayoutNameW.

    Link below for your reference.

    http://msdn.microsoft.com/en-us/library/windows/desktop/ms646298(v=vs.85).aspx


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    2013年12月10日 7:24