Solved

64K limit on rich edit control?

Posted on 1997-05-09
3
436 Views
Last Modified: 2010-04-03
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.
0
Comment
Question by:kristoffer
3 Comments
 
LVL 4

Expert Comment

by:StevenB
Comment Utility
 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
 

Accepted Solution

by:
kangadru earned 100 total points
Comment Utility
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
 

Author Comment

by:kristoffer
Comment Utility
Edited text of question
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

9 Experts available now in Live!

Get 1:1 Help Now