建议在OnKeyDown事件中自己画不同的颜色...

解决方案 »

  1.   

    呵呵,不好意思,意思理解错了... :) 其实你截获这两个消息就可以了WM_IME_COMPOSITION和WM_IME_NOTIFY,前者在IME输入字符时触发。 WM_IME_COMPOSITIONThe WM_IME_COMPOSITION message is sent to an application when the IME changes composition status as a result of a key stroke. An application should process this message if it displays composition characters itself. Otherwise, it should send the message to the IME window.chDBCS = (WORD) wParam;
    fFlags = (BOOL) lParam;
      ParameterschDBCSDBCS character representing the latest change to the composition string.fFlagsChange flag, indicating how the composition string or character changed. This parameter can be one or more of the following values:GCS_COMPSTR GCS_SETCURSORPOS
    GCS_COMPATTR GCS_RESULTSTR
    GCS_COMPCLAUSE GCS_RESULTCLAUSE
    GCS_COMPREADSTR GCS_RESULTREADSTR
    GCS_COMPREADATTR GCS_RESULTREADCLAUSE
    GCS_COMPREADCLAUSE GCR_ERRORSTR
    GCS_TYPINGINFO GCR_INFOSTR
     Return ValuesNo return value.ResFor more information about these values, see the "IME Composition String Values" table in Input Method Editor Constants.
    The fFlags parameter can also be a combination of the following values:Value Meaning
    CS_INSERTCHAR Specifies that the given composition character should be inserted at the current insertion point. An application should display the composition character if it processes this message.
    CS_NOMOVECARET Specifies that the application must not move the caret position as a result of processing the message. For example, if an IME specifies a combination of CS_INSERTCHAR and CS_NOMOVECARET, the application should insert the given character at the current caret position but should not move caret to the next position. A subsequent WM_IME_COMPOSITION message with GCS_RESULTSTR will replace this character.
     If the application has created an IME window, it should pass this message to that window. The DefWindowProc function processes this message by passing it to the default IME window.The IME window processes this message by updating its appearance based on the change flag given. An application can call ImmGetCompositionString to retrieve the new composition status.
    If none of the GCS_ values are set, the message indicates that the current composition has been canceled and applications that draw the composition string should delete the string.See AlsoDefWindowProc, ImmGetCompositionString WM_IME_NOTIFYThe WM_IME_NOTIFY message is sent to an application to notify it of changes to the IME window. An application processes this message if it is responsible for managing the IME window.dwCommand = (DWORD) wParam;
    dwData = (DWORD) lParam;
      ParametersdwCommandCommand value. This parameter may be one of the following values:IMN_CHANGECANDIDATE IMN_SETCANDIDATEPOS
    IMN_CLOSECANDIDATE IMN_SETCOMPOSITIONFONT
    IMN_CLOSESTATUSWINDOW IMN_SETCOMPOSITIONWINDOW
    IMN_GUIDELINE IMN_SETCONVERSIONMODE
    IMN_OPENCANDIDATE IMN_SETOPENSTATUS
    IMN_OPENSTATUSWINDOW IMN_SETSENTENCEMODE
    IMN_PRIVATE IMN_SETSTATUSWINDOWPOS
     For more information about these commands, see the corresponding descriptions.dwDataCommand-specific value. Return ValuesReturns a command-specific value.
    IMN_CHANGECANDIDATE, IMN_OPENCANDIDATE, IMN_OPENSTATUSWINDOW, IMN_SETCANDIDATEPOS, IMN_SETCOMPOSITIONFONT, IMN_SETCOMPOSITIONWINDOW, IMN_SETCONVERSIONMODE, IMN_SETOPENSTATUS, 
    IMN_SETSENTENCEMODE, IMN_SETSTATUSWINDOWPOS
      

  2.   

    看看这两个帖子,或者对你有帮助。http://expert.csdn.net/Expert/topic/2393/2393827.xml?temp=.9472925http://expert.csdn.net/Expert/topic/2533/2533489.xml?temp=.2405054
      

  3.   

    我有同感!!!那怎么解决呢?我的代码在:
    http://www.efile.com.cn/?liumazi