RXRICHEDIT Chinese Support BUG Correction (1)

xiaoxiao2021-03-06  61

Function TRXCUSTOMRICHEDIT.GETTEXTRANGE (StartPos, Endpos: longint): string;

VAR

TEXTRANGE: TTEXTRANGE;

Begin

// SETLENGTH (Result, Endpos - StartPOS 1);

SETLENGTH (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 Chinese characters will not have wrong, such as sure, cancel!

转载请注明原文地址:https://www.9cbs.com/read-119302.html

New Post(0)