hi all
Is there any way to assign more memory for a Memo or RichEdit (if working with big files)
thanks
hi all
Is there any way to assign more memory for a Memo or RichEdit (if working with big files)
thanks
Allocate memory with LocalAlloc
and then give it to the edit control with the em_SetHandle
message. You can handle the en_ErrSpace
notification if the edit control requires more space. MSDN describes the process in the "About Edit Controls" article. It doesn't work on rich-edit controls, though; they don't store their data in a contiguous buffer like edit controls do.
Rather than load the whole file, wouldn't it be better to use the control as a 'window' to the data? Just load your data in chunks, loading more (and getting rid of some) as the user scrolls up or down.
I would recommend switching to another edit control like SynEdit(it can load 80 mb of text file in few miliseconds).