Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The ImmGetDescription API Method is not functioning well when getting descripitions of the input methodsMicsrosoft Office IME 2007 and versions above.
The Code Is Here:
C++
HKL m_lLayoutHandle = GetKeyboardLayout(0);
HWND m_lTargetWindow = hDlg;

//REGISTERWORD tRegWord;
//tRegWord.lpReading = TEXT("");<small></small>
//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);

TCHAR szImeFileID[MAX_PATH];
ZeroMemory(szImeFileID,MAX_PATH);
GetKeyboardLayoutName(szImeFileID);
MessageBox(hDlg,(LPCTSTR)(szImeFileID),TEXT("OK"),0);


Is there anybody can solve my problem? There is another question,Why does The API GetKeyboardLayoutName always returns 0x00000411,when I use the IME 2007 input method and my local language is japanese,and I expect the return value to represent the regedit value of IME 2007.
Posted
Updated 3-Dec-13 22:26pm
v10

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900