64K limit on rich edit control?

The TRichEdit control allows me to load a big file (600K) and display it fine, but the editing on such a large file doesn't work correctly. In order to type something you have to either delete existing stuff or write over existing text.  Is there a way around this or a fix for it?
I am using Windows '95, and there is no code attached anywhere. You can try it yourself with the Richedit demo in the Demos directory by loading a large file and trying to type in stuff.
kristofferAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

StevenBCommented:
 I intend this as serious advice, not just a flippent comment:

  If you intend to write a serious application, avoid Delphi's TRichEdit, it is not very good, you will run into problem upon problem, I recomend that you find a better component from somewhere, there's lots of them about.

  Steven.

  (Try :
  http://members.aol.com/jziersch/index.html
  or maybe:
  http://SunSITE.icm.edu.pl/delphi/
  )


0
kangadruCommented:
Depending entirely on your choice of Windows95 or Windows NT 4.0 effects this as well.  Judging from your question, I will assume that you are on Windows95.  Steve is correct in pointing out that the TRichEdit in Delphi is a little buggy.  However it's bugs probably aren't really related to your problem.  You can test this as I did by loading the RichEdit Sample that shipped with Delphi 2.x.  If that one properly loads your file then you problem is something related to your usage of the control, and not the control itself.  Without looking at your code and form, I would tend to suspect your problem lies in how the modifications are being made.  If they are being done programatically, I believe you are running into a problem with the number characters in the control going over the integer definition and the caret position goes negative,if you are using the EM_SETSEL API then you can get around this.  If you are seeing this problem when typing you will probably have either a MAXLENGTH set for the control or you are running out of memory.  Now with all of that said, the Delphi 3 implementation of RichEdit is much more stable and has many improvements.  The Delphi RichEdit control is simply a wrapper around the Win32 Common Control RichEdit that both MFC and Visual Basic use.  While they have certain limitations they are still quite usable.I hope some of this helps you out, I personally avoid the richedit control like the plague for several reasons, however I have written an RTF printer specifically for MAil Merge with files well over 600k using the Win32 RTF control, with only memory being a problem.  When handling files of this size, the RTF control has a nasty habit of crunching large amounts of Physical RAM, and on Windows95 Resources.  Oddly enough Window NT doesn;t appear to suffer from the same problems and works rather well.  I don't know if the Common Controls for the two platforms are that different or if NT's architecture alleviates the problems or not.Andy
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kristofferAuthor Commented:
Edited text of question
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

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.