How much text can a CEdit control contain?
Hi all,
I have created a dialogbased MFC application. The dialogbox contains a normal editbox based on CEdit. I need to write at least 100kB text out in the editbox, but it will only display about 40kB of the text.
Is this the upper limit for the CEdit control?
Can a RichEditBox contain more text?
Any other suggestions to how a can solve this problem?
Thanks
Jimmi Christensen
Re: How much text can a CEdit control contain?
Hi,
you are right, the capacity of a CEdit control is limited (obviously it's based on 16 bit-code). If you want to display more text in your dialog, you should use a CRichEditCtrl instead.
Greetings, Jörg
Re: How much text can a CEdit control contain?
the limit is 64k if my memory is correct...
However, you can have an amount of text which is only limited by the amount of memory available on your computer (virtually unlimited) in a RichEdit control
Re: How much text can a CEdit control contain?
Quote:
Originally Posted by Grind
the limit is 64k if my memory is correct...
However, you can have an amount of text which is only limited by the amount of memory available on your computer (virtually unlimited) in a RichEdit control
no it doesnt work
is there some setting i must do?
Re: How much text can a CEdit control contain?
to use a CRichEditCtrl you have to call the AfxInitRichEdit once before using these controls! If you have a Dialog based application I would recommend to make the call in the CWinApp derived class in the InitInstance function.
Regards,
Laitinen
Re: How much text can a CEdit control contain?
You can change the amount of text that a CEdit can hold by using SetLimitText.
Hope that helps.