Does anybody know the trick to use EM_GETIMECOMPTEXT message?
I try to use it to get Input Method Edit's composition string, and spended lots of time on it with no result.
I have followed the instruction of MSDN document, created RichEdit 4.1 control, other functions work well, only this message do not give me result I want. following are part of code:
IMECOMPTEXT imeCompText;
imeCompText.cb=40;
imeCompText.flags=ICT_RESULTREADSTR;
BYTE compBuffer[40];
int compBufferLen;
compBufferLen=SendMessage(hwndRichEdit, EM_GETIMECOMPTEXT, (WPARAM)&imeCompText, (LPARAM)compBuffer);
It should put Composition string in compStrBuffer, and return the number of Unicode characters copied to the buffer, but it does not.
Anybody know the trick to use this EM_GETIMECOMPTEXT message?
Thanks sincerely.
Guilin