How to use EM_GETIMECOMPTEXT message?

This is a discussion on How to use EM_GETIMECOMPTEXT message? within the Windows Programming forums, part of the Platform Specific Boards category; Does anybody know the trick to use EM_GETIMECOMPTEXT message? I try to use it to get Input Method Edit's composition ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    6

    How to use EM_GETIMECOMPTEXT message?

    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
    Last edited by guilin; 12-06-2007 at 09:05 AM. Reason: correction

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    6
    The EM_GETIMECOMPTEXT message works, the reason is that no Composition String is send out from IME (Input Method Editor), so Cann't get any result.

    Sorry for the misleading message.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange string behavior
    By jcafaro10 in forum C Programming
    Replies: 2
    Last Post: 04-07-2009, 08:38 PM
  2. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  3. Making a script language?
    By Blackroot in forum Game Programming
    Replies: 10
    Last Post: 02-16-2006, 02:22 AM
  4. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 06:48 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 10:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21