Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • Last Modified:

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?

0
PaulKorzycki
Asked:
PaulKorzycki
  • 7
  • 2
1 Solution
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

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!

  • 7
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now