Solved

RichEdit EOutOfResources Question

Posted on 2001-07-26
9
452 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
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6333267
paul, are you alive?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi OLE Error 8 95
How to use Hashing sha1 in Delphi 2010 4 203
Delphi Dbf export problem to a Visual Foxpro application 6 162
Internet Explorer View Settings Question 15 106
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now