Link to home
Start Free TrialLog in
Avatar of dutong
dutong

asked on

How to make CEdit Text > 32k

the CEdit text buffer is limited in 32k, how to extend CEditView class to accept large file, I think to detect when read to the end of the buffer, then load the other part.
But how to do it, how to make the Edit control to realize large memory?
Thanks!
Avatar of piano_boxer
piano_boxer

The solution is to switch to the RichEdit control. It has no upper limit.
  The Rich Edit control is the only solution, if you need more than 64KB.  The single line edit control has a max of 32K, while a multiple line Edit Control has a max of 64KB...

   There is a Knowledge Base article on how to allocate a buffer and make the Edit Control use that buffer, so that you can get the whole 64KB limit.

-=- James.
Avatar of dutong

ASKER

I know the limitation of CEdit, it hold a local heap handle, so can not make the file large,
My question is : can I use the CEdit display and help it to manage the memory
  Yes, you can...  If you search the Microsoft Knowledge base, (and the online documentation), there is information on how to allocate a new buffer, and set it.

-=- James.
ASKER CERTIFIED SOLUTION
Avatar of fwilkinson
fwilkinson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
  The article that "fwilkinson" suggested has what I discussed..  You basically allocate a buffer for the Edit Control, and tell it to use the new Buffer.

-=- James.