January 15th, 2013, 06:57 AM
Join Date: May 2012
Time spent in forums: 1 Day 6 h 53 m 49 sec
Reputation Power: 2
To get count of characters, use window message WM_GETTEXTLENGTH
. Something like this:
function GetCountOfChars(ARichEdit: TRichEdit): Cardinal;
Result := SendMessage(ARichEdit.Handle, 0, 0);
Note that for this to work, the richedit must already has valid window handle.
To get count of rows, use the richedit's Lines
property. It got a Count
property which explains how many lines the richedit has.
To get count of selected characters, use the richedit's SelLength