Solved

RichEdit EOutOfResources Question

Posted on 2001-07-26
9
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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