RichEdit EOutOfResources Question

Hi!

I have a program where I read a file (roughly 800K) into a RichEdit box.  I then want to add some text to it (EditBox.Lines.Add(string));

I keep getting the EOutOfResources exeption.

Any way to solve this?

PaulKorzyckiAsked:
Who is Participating?
 
kretzschmarCommented:
try

richedit1.perform(EM_EXLIMITTEXT,0,$0FFFFFFF);

(you can play with the $0FFFFFFF paramater,
which is just the max amount of bytes a richedit can hold, default is 64K)

before loading the text or adding text ti it

meikl ;-)
0
 
kretzschmarCommented:
$0FFFFFFF(256 MB)  would be a bit too much
$FFFFF would be 1MB and enough for your needs

meikl ;-)
0
 
kretzschmarCommented:
paul?
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
kretzschmarCommented:
paul, are you alive?
0
 
kretzschmarCommented:
he is absent :-(
0
 
kretzschmarCommented:
preventive lock . . .
0
 
PaulKorzyckiAuthor Commented:
Hi, sorry for the delay...I was on vacation for a few days.

When I added your line, I got:

Undeclared Identifier: 'EM_EXLIMITTEXT'.

I'm assuming I should add something to the uses clause, but what?

Thanks for your help
0
 
PaulKorzyckiAuthor Commented:
Well, I looked into the online manuals, and added

Uses RichEdit,

and voila!  It works like a dream.  Thanks for all your help!
0
 
kretzschmarCommented:
glad to helped you,paul.

well, i forgot to inform you that you have to add richedit into the uses-clause, because there are all the richtext-message constants declared, but you found it already byself :-)

good luck again

meikl ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.