RichViewEdit.GetTextLen always "0"

General TRichView support forum. Please post your questions here
Post Reply
Crowbar
Posts: 82
Joined: Wed Oct 11, 2006 8:54 pm
Location: Germany

RichViewEdit.GetTextLen always "0"

Post by Crowbar »

Hi,
the Standard-RichEdit is ok! The result is to example "20".
MaxLen:=RichEdit.GetTextLen;

With RichViewEdit is the result always "0".
MaxLen:=RichViewEdit.GetTextLen;

How can I get length of the total text in the RichViewEdit?

Another question:
Why do I get "0" forever also with this function?
...
TextLenEx.flags := GTL_DEFAULT;
TextLenEx.codepage := CP_UTF8;
MaxLen:=SendMessage(RichViewEdit.Handle, EM_GETTEXTLENGTHEX, Integer(@TextLenEx), 0);
...

Crowbar
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

GetTextLen simple uses WM_GETTEXTLENGTH message.

Processing of WM_GETTEXT, WM_GETTEXTLENGTH, WM_SETTEXT was disabled for Delphi 2005 and 2006, because it conflicted with VCL implementation. Sorry, I do not plan to restore them.

EM_GETTEXTLENGTHEX is not supported.

Use the functions RVGetTextRange and RVGetTextLength from RVLinear.pas.
Post Reply