Sign in to follow this  
wxyee

How to get the name of chinese input method on Vista/Win7?

Recommended Posts

The codes are no problem on XP, but there is something wrong on Vista/Win7. I can't get the name of chinese input method. Help me pls. My codes are as follow: HKL hKL = ::GetKeyboardLayout(0); int nSize = ::ImmGetDescription(hKL, NULL, 0); if(nSize>0) { ImmGetDescription(hKL, m_szImeName, 200); //Get the input method name }

Share this post


Link to post
Share on other sites
In Windows Vista, Microsoft re-wrote all of the IMEs to use the TSF (Text Services Framework), rather than IMM. Most of the time, you shouldn't notice, but use of ImmGetDescription is one case where you will notice.

Here is some more information.

If this is for a new application, I would suggest you switch to TSF, since that's the "way of the future" anyway (of course, you might not have a choice...)

Share this post


Link to post
Share on other sites
Quote:
Original post by Codeka
In Windows Vista, Microsoft re-wrote all of the IMEs to use the TSF (Text Services Framework), rather than IMM. Most of the time, you shouldn't notice, but use of ImmGetDescription is one case where you will notice.

Here is some more information.

If this is for a new application, I would suggest you switch to TSF, since that's the "way of the future" anyway (of course, you might not have a choice...)



Thank you for your answer.
Yes I know my old method IME can't go far away. How can I just get the name of input method and the candidatelist using the TSF with windows API? Is there any sample codes I can look up?

Share this post


Link to post
Share on other sites
Unfortunately, I don't know the answer to that one :-) I've not had much to do with IMEs for a while, and I always found the TSF documentation to be a little sparse...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this