IME Support
IME Support
Do you have a plan to support IME (Input Method Editor) in the internal editor?
It is very important for East Asian users whether application is IME-aware or not.
It is very important for East Asian users whether application is IME-aware or not.
Re: Japanese IME
Not so great on my Windows XP system.Steve Squires wrote:Japanese IME works great with CompareIt on my Windows XP system.
You can use IME and input Japanese characters, if you don't mind the IME composition window pops up outside the editor window. But Asian users expect that IME composition window would be directly shown in the editor window.
I'm afraid whether I could explain the issue. If you have Japanese (or any other Asian version) Windows, please use IME in Notepad. You will understand what I say.
I hear that "IME-aware" application must handle some IME/IMM window messages and call IME/IMM related APIs properly. I'm sorry I don't know much about these. Please refer to MSDN.
IME Support
Sorry for my delayed reply.
I have known recently something about IME control, I write them here.
Probably the most important point is that your unicode version of CompareIt! process WM_IME_STARTCOMPOSITION message. The message handler will become like this:
Don't forget include "imm.h".
Perhaps this will work. If not, something may lack. I will continue learning about IME control.
If you can't experiment whether this will work or not, I will test it instead of you. Would you please send me alpha version of CompareIt! if possible? (I am a registerd user. The registered name is "Naoki Tanaka".)
Thanks in advance.
I have known recently something about IME control, I write them here.
Probably the most important point is that your unicode version of CompareIt! process WM_IME_STARTCOMPOSITION message. The message handler will become like this:
Code: Select all
// WM_IME_STARTCOMPOSITION message handler
// Get IME context handle.
// "hWnd" is HWND handle of your editor control.
HIMC hImc = ImmGetContext( hWnd );
if ( hImc ) {
// Set IME composition font.
// "lfLogFont" is LOGFONTW structure of your editor control.
ImmSetCompositionFontW( hImc, &lfLogFont );
// Set IME composition window position.
// "ptCurPos" is POINT structure of current caret position in your editor control.
COMPOSITIONFORM cfCompForm;
cfCompForm.dwStyle = CFS_POINT;
cfCompForm.ptCurrentPos = ptCurPos;
ImmSetCompositionWindow( hImc, &cfCompForm );
// Release IME context handle.
// "hWnd" is HWND handle of your editor window.
ImmReleaseContext( hWnd, hImc );
}
Perhaps this will work. If not, something may lack. I will continue learning about IME control.
If you can't experiment whether this will work or not, I will test it instead of you. Would you please send me alpha version of CompareIt! if possible? (I am a registerd user. The registered name is "Naoki Tanaka".)
Thanks in advance.
OK, seems like you are right - I was able to setup IME on work PC, and can see the difference now. Your code is sufficient, from my point of view.
You can check it here - http://www.grigsoft.com/wincmp3bu.zip.
You can check it here - http://www.grigsoft.com/wincmp3bu.zip.
Great! It works fine so far.
But... there is an issue to be improved: (Don't say I'm nervous...)
Height of IME composition window is a little bigger than usual line. Would you please change the part of setting IME composition window position as follows:
// Set IME composition window position.
// "ptCurPos" is POINT structure of current caret position in your editor control.
COMPOSITIONFORM cfCompForm;
cfCompForm.dwStyle = CFS_FORCE_POSITION; // Change from CFS_POINT
cfCompForm.ptCurrentPos = ptCurPos;
ImmSetCompositionWindow( hImc, &cfCompForm );
I don't test this code, but I would like to examine it because of the description of Win32 SDK Help file. Please try it if you have time.
Thanks.
But... there is an issue to be improved: (Don't say I'm nervous...)
Height of IME composition window is a little bigger than usual line. Would you please change the part of setting IME composition window position as follows:
// Set IME composition window position.
// "ptCurPos" is POINT structure of current caret position in your editor control.
COMPOSITIONFORM cfCompForm;
cfCompForm.dwStyle = CFS_FORCE_POSITION; // Change from CFS_POINT
cfCompForm.ptCurrentPos = ptCurPos;
ImmSetCompositionWindow( hImc, &cfCompForm );
I don't test this code, but I would like to examine it because of the description of Win32 SDK Help file. Please try it if you have time.
Thanks.