在TcxRichEdit能够输入中文,但是如何获取输入的中文内容呢?我使用
rchdt.EditingText
rchdt.Text
都无法获取输入的中文字符啊,郁闷中....希望高手给予帮助。

解决方案 »

  1.   

    TcxRichEdit就是第三方控件。目前使用TcxMemo代替,不过还是希望知道如何使TcxRichEdit支持中文
      

  2.   

    难道TcxRichEdit不支持中文吗,我没见过,你改系统字体了吗
      

  3.   

    修改 cxRichEdit.pas中方法 WMGetTextLength
    ATextInfo.flags := GTL_PRECISE or GTL_NUMCHARS or AUseCRLFFlag[FUseCRLF];
    改為
    ATextInfo.flags := GTL_PRECISE or GTL_NUMBYTES or AUseCRLFFlag[FUseCRLF];GTL_NUMCHARS
    Returns the number of characters. This flag cannot be used with the GTL_NUMBYTES flag. E_INVALIDARG will be returned if both are used.
    GTL_NUMBYTES
    Returns the number of bytes. This flag cannot be used with the GTL_NUMCHARS flag. E_INVALIDARG will be returned if both are used.若是D2009 + Dev 則不會有問題