and also not bad to take a look in this links :
http://www.experts-exchang
http://www.experts-exchang
Main Topics
Browse All TopicsHello All;
Can someone tell me how to overcome the RichEdit Line limit?
(Wordpad has about a 3,068 character Line Limit. I need to get way over this line limit, about 10,000+ Characters
Is what I need to go with)
I know how to overcome the File Size limit.
But what I am needing is the [Line - String] Limit.
Any idea's on this one?
Thanks all;
Carrzkiss
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
and also not bad to take a look in this links :
http://www.experts-exchang
http://www.experts-exchang
Thought I was already using that, but did not add it into the newest version of the code.
Except, I am using
RichEdit1.Perform(EM_LIMIT
What does the $7FFFFFF); // ??mb file Size ??
Size limit for 1-line is: 4099 Characters.
The code that you provided, as well is what I am using, allows to load more "Lines"
I need to add in more "Characters"
It seems that this might be a limitation in the RichEdit control?
Also, I checked out the links, "Thanks for them"
I am not experiancing any problems thus far, And the biggest file size that I have loaded is:
Size: 16.6mb
Lines: 22,921
Char-Count: 17506692
memory: 4,684
CPU: Peaks: 99% for 1-second then settles at: 00% --> Steady
I use this for the Memory, to hold it steady through out all.
SetProcessWorkingSetSize(G
Anyway.
If anybody knows how to add more then the 4,099 Character Per Line Limit, I would love to know.
Thanks All, and Thanks [Azhdari]
Carrzkiss
win2k pro sp4 rollup
I do not think that everybody is understanding what I am referring too.
To recreate this issue, do the following.
Add the following line (1 single line, just copy/paste the line over and over again, and it will do a return
And create another line at around 4,000+ character length)
ssssssssssssssssssssssssss
(Just copy the sssss from above, and start pasting it into 1-LINE (Not line after line) 1-Line)
I need for the "Single Line" to continue on and paste 10,000 characters.
You will see what I am referring too.
I can load 50+mb files with no problem as well.
I was given this information but I do not know how to convert code over from C to Delphi
http://msdn.microsoft.com/
lResult = SendMessage( // returns LRESULT in lResult
(HWND) hWndControl, // handle to destination control
(UINT) EM_GETLINE, // message ID
(WPARAM) wParam, // = (WPARAM) () wParam;
(LPARAM) lParam // = (LPARAM) (LPCTSTR) lParam; );
Any idea's?
I was just given this information, maybe someone can assist in this? Please
==========================
lParam
Pointer to the buffer that receives a copy of the line. Before
sending the message, set the first word of this buffer to the size, in
TCHARs, of the buffer. For ANSI text, this is the number of bytes; for
Unicode text, this is the number of characters. The size in the first word
is overwritten by the copied line.
Simply specify a buffer that is large enough, and EM_GETLINE will fill it as
much as it can. You can use EM_LINELENGTH to find out the length of a line
beforehand so that you can allocate a large enough buffer as needed.
==========================
The work break procedure for the rich edit seems to be the key. The example below will show you how to break the limit set by the default wordbreak proc (only needs to be set once), and then shows adding very long lines and how to read them back.
Let me know if there are question/problems
Regards,
Russell
---
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls;
type
TForm1 = class(TForm)
RichEdit1: TRichEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
const
WB_CLASS_WHITESPACE = 0;
WB_CLASS_LINEBREAK = 1;
WB_CLASS_DELIMITER = 2;
WB_CLASS_NORMALCHAR = 3;
const
WB_CLASSIFY = 3;
WB_MOVEWORDLEFT = 4;
WB_MOVEWORDRIGHT = 5;
WB_LEFTBREAK = 6;
WB_RIGHTBREAK = 7;
const
WBF_CLASS = $0000000F;
WBF_ISWHITE = $00000010;
WBF_BREAKLINE = $00000020;
WBF_BREAKAFTER = $00000040;
const
WHITESPACE: Set of Char = [#9, #32];
DELIMITERS: Set of Char = ['"', '[', ']', '(', ')', ';', ',', '.', '\', ''''];
LINEBREAKERS: Set of Char = [#10, #13];
function IsInDelimiterList(C: Char): Boolean;
begin
// Check for char in delimiter type list
result:=(C in LINEBREAKERS);
end;
function EditWordBreakProcEx(pchTex
var i: Integer;
found: Boolean;
initial_pos: Integer;
begin
result:=0;
case Code of
WB_LEFT :
begin
while (not(IsInDelimiterList(pch
if (ichCurrent > 0) then
result:=Succ(ichCurrent)
else
result:=-1;
end;
WB_RIGHT :
begin
while (not(IsInDelimiterList(pch
if (ichCurrent > 0) then
result:=ichCurrent
else
result:=-1;
end;
WB_ISDELIMITER :
begin
result:=1
end;
WB_CLASSIFY :
begin
if (pchText^ in WHITESPACE) then
result:=WBF_ISWHITE or WB_CLASS_WHITESPACE
else if (pchText^ in DELIMITERS) then
result:=WBF_BREAKAFTER or WB_CLASS_DELIMITER
else if (pchText^ in LINEBREAKERS) then
result:=WBF_BREAKLINE or WB_CLASS_DELIMITER
else
result:=WB_CLASS_NORMALCHA
end;
WB_MOVEWORDLEFT :
begin
Dec(ichCurrent);
found:=False;
while IsInDelimiterList(pchText[
while (ichCurrent < cch) and not(found) and (ichCurrent >= 0) do
begin
found:=IsInDelimiterList(p
if (found and (ichCurrent >=0)) then
result:=Succ(ichCurrent)
else
begin
result:=MaxInt;
Dec(ichCurrent);
end;
end;
end;
WB_MOVEWORDRIGHT :
begin
if not(IsInDelimiterList(pchT
begin
while (not(IsInDelimiterList(pch
end;
while (IsInDelimiterList(pchText
if (ichCurrent < cch) then
result:=Succ(ichCurrent)
else
result:=-1;
end;
WB_LEFTBREAK :
begin
while (not(IsInDelimiterList(pch
if (ichCurrent > 0) then
result:=ichCurrent
else
result:=-1;
end;
WB_RIGHTBREAK :
begin
while (not(isInDelimiterList(pch
if (ichCurrent > 0) then
result:=ichCurrent
else
result:=-1;
end;
end;
end;
function RichEditGetLine(Handle: HWND; Index: Integer): string;
var Text: array [0..32768] of Char;
L: Integer;
begin
Word((@Text)^) := SizeOf(Text);
L := SendMessage(Handle, EM_GETLINE, Index, Longint(@Text));
if (Text[L - 2] = #13) and (Text[L - 1] = #10) then Dec(L, 2);
SetString(Result, Text, L);
end;
procedure TForm1.Button1Click(Sender
var s: String;
begin
// Remove text limit from control
RichEdit1.Perform(EM_LIMIT
// Set custom word break procedure
RichEdit1.Perform(EM_SETWO
// Example of adding a really long line
RichEdit1.Lines.Add(String
// Get the first line, line 0. We can't use RichEdit.Lines[0] because the internal
// buffer used is limited to 4KB.
s:=RichEditGetLine(RichEdi
// Show line length
ShowMessage(IntToStr(Lengt
end;
end.
Business Accounts
Answer for Membership
by: AmirAzhdariPosted on 2006-06-17 at 20:33:00ID: 16928365
add this line to the form's create :
le,EM_LIMI TTEXT,0,$7 FFFFFFF);
procedure TForm1.FormCreate(Sender: TObject);
begin
sendmessage(RichEdit1.Hand
end;
Regards
Azhdari