TMemo / TRichEdit有更多内存 [英] more memory for TMemo / TRichEdit

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

问题描述

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

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

谢谢

推荐答案

使用 < LocalAlloc ,然后使用 em_SetHandle 消息。您可以处理 en_ErrSpace 通知,如果编辑控件需要更多空间。 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有更多内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆