Click to See Complete Forum and Search --> : CEdit limit on win95?


Raymond Lai
April 13th, 1999, 07:54 PM
Hi,

This is my first post so please bear with me if I am doing anything wrong....

Does CEdit (or actually CEditView) have any hidden text limit on win95? I wrote a program that uses GetEditCtrl().GetLimitText()*3/4

as the threshold of window text for a CEditView derived class object on win95. What happened was, depending on the initial size of the text window, sometimes the text gets to write up to that threshold and sometimes it doesn't and just hangs there. I couldn't find anything in CEdit other than GetLimitText() that controls the text size of the window.

BTW, the documentation says that the maximum size for a CEdit is 64k on win95. If that's the case how do people iimplement editors with CEditView on win95?

Oh another thing, I used GetVersionEx to figure out it's win95. The program was actually built with vc++ 5.0 on NT4.

Thanks in advance for any help.

-Raymond

Prashanth
April 14th, 1999, 10:33 AM
CEdit has a limitation of 64K. The easiest way to overcome the problem is to use a rich edit control instead.

Raymond Lai
April 14th, 1999, 11:41 AM
> CEdit has a limitation of 64K. The easiest way to overcome the problem is to use a rich edit control instead.

Thanks for the reply. GetEditCtrl().GetLimitText()

does return 64K.

My problem is I use 64K*3/4 as the threshold of the window text and always chop off the top 1/3 of the text once the threshold is reached. This works fine sometimes: I can keep writing text into the window (which actually acts like a console) for hours. However sometimes the window just hangs before reaching the threshold (the size of the window text at those times vary, but the smallest I found was around 25K). I really want to figure out why this happens and how, if possible, to detect and avoid it programmatically.

I'll give CRichEdit a try anyway. Thanks.

-Raymond

Saeed R
May 12th, 1999, 06:20 PM
I have the same problem ...but now by replacing the Edit with rich edit the dialoge does not popup...Do you know why?

sally
May 12th, 1999, 08:45 PM
Notepad is written using CEditView and has the limit of 64kb
Wordpad uses CRichEditView and has not the 64kb limit

Sally

OBS, k is the metric symbol for kilo, so 64000 is correctly 64k
64K is denoting a temperature using the Kelvin scale, 64K is very very cold indeed...

Sally
May 12th, 1999, 08:45 PM
Notepad is written using CEditView and has the limit of 64kb
Wordpad uses CRichEditView and has not the 64kb limit

Sally

OBS, k is the metric symbol for kilo, so 64000 is correctly 64k
64K is denoting a temperature using the Kelvin scale, 64K is very very cold indeed...