Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


CEdit memory limitation ?

Posted on 1999-07-05
Medium Priority
Last Modified: 2013-11-20
I have a CEdit object which I fill with a "big" amount of text.
I have noticed the fact that after 30k byte the CEdit object stops inserting text.
is this a known limit of CEdit control ?
can I increase it ?
is there another way to pass this limitation (I'm using the CEdit as a output window in my application).

Question by:yoavo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 23

Accepted Solution

naveenkohli earned 80 total points
ID: 1308906
Here is some stuff from Microsoft's knowledge base article... For more infrmation, read this article on limits for edit control..

Article ID: Q181932
INFO: Limits on Text in CEditView and CEdit


Windows 95 has a 64 KB limit on edit controls that cannot be increased. To adjust the limit within this range, use CEdit::SetLimitText(UINT nMax), where nMax is the number of bytes in the new text limit. You can set nMax to 65535 to obtain the maximum (which is actually 64000 bytes).

Windows NT has a practical, machine-dependent limit on edit controls. Users will run into this machine-dependent limit before they reach operating- system dependent limit. You can increase the limit by using SetLimitText(UINT nMax). You can set nMax to some large number such as 4111222333 to obtain the maximum your machine will allow. The practical limit is based on the computer's RAM. For example, it is possible to load 1 million very short lines of text (nearly 8 MB) into an edit control using a computer with 64 MB of RAM. Unfortunately, it may use up nearly 100 percent of the CPU power and take several minutes to load. Once it is loaded in memory, the control works slowly.

If you need to use a control that is expected to contain near or over 64 KB of data, use CRichEditCtrl or CRichEditView. These classes wrap the rich edit Windows control. In both Windows 95 and Windows NT4, there is no definite limit on the amount of text that the control can hold. Theoretically, the rich edit control allows for a maximum of 4 GB of text. In practice, you can run into performance problems with even less than 1 MB of text. Files with many lines of text (not necessarily large files, because the lines can be very short) require a lot of time and CPU power to process the first time scrolling or resizing of the view window. Once the CPU has processed these actions, the control behaves normally


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!

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

704 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