Solved

RichEdit EOutOfResources Question

Posted on 2001-07-26
9
456 Views
Last Modified: 2013-11-22
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?

0
Comment
Question by:PaulKorzycki
  • 7
  • 2
9 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 6324390
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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6324450
$0FFFFFFF(256 MB)  would be a bit too much
$FFFFF would be 1MB and enough for your needs

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6326615
paul?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 27

Expert Comment

by:kretzschmar
ID: 6333267
paul, are you alive?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6337371
he is absent :-(
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6339366
preventive lock . . .
0
 

Author Comment

by:PaulKorzycki
ID: 6344716
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
 

Author Comment

by:PaulKorzycki
ID: 6344746
Well, I looked into the online manuals, and added

Uses RichEdit,

and voila!  It works like a dream.  Thanks for all your help!
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6345034
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question