本文介绍了TMemo / TRichEdit有更多内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以为Memo或RichEdit分配更多内存(如果使用大文件)

Is there any way to assign more memory for a Memo or RichEdit (if working with big files)

谢谢

推荐答案

使用,然后使用消息。您可以处理通知,如果编辑控件需要更多空间。 MSDN在中描述了该过程。 。但是,它不适用于富编辑控件。他们不会像编辑控件那样将数据存储在连续的缓冲区中。

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.

这篇关于TMemo / TRichEdit有更多内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 19:36