Solved

64K limit on rich edit control?

Posted on 1997-05-09
3
453 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
ID: 1336075
 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
ID: 1336076
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
ID: 1336077
Edited text of question
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi TcxGrid group footer summary 3 320
Delphi 2 69
How to renew a Delphi rad-studio licence? 5 69
I want to use librsync in my Delphi backup application. 3 60
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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…

820 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