RxRichEdit中文支持BUG修正(1)

来源:互联网 发布:少女时代tiffany知乎 编辑:程序博客网 时间:2024/05/17 03:38
function TRxCustomRichEdit.GetTextRange(StartPos, EndPos: Longint): string;var  TextRange: TTextRange;begin  // SetLength(Result, EndPos - StartPos + 1);  SetLength(Result, (EndPos - StartPos) * 2 + 1);  TextRange.chrg.cpMin := StartPos;  TextRange.chrg.cpMax := EndPos;  TextRange.lpstrText := PAnsiChar(Result);  SetLength(Result, SendMessage(Handle, EM_GETTEXTRANGE, 0, Longint(@TextRange)));end;SelAttributes.Link:=True 2个汉字不会出错了 比如 确定,取消!
原创粉丝点击