edit控件的ReplaceSel()会不会清内存?
例如:
我之前有很多数据
m_Edit.SetSel(0,-1);//全选
m_Edit.ReplaceSel("");//
之前分配的内存空间会不会随着ReplaceSel变小?
例如:
我之前有很多数据
m_Edit.SetSel(0,-1);//全选
m_Edit.ReplaceSel("");//
之前分配的内存空间会不会随着ReplaceSel变小?
解决方案 »
- FFTW做IFFT时,结果数据的符号错误.求大侠!
- 如何在MFC的Dialog上面点击按钮,实现无闪烁画图
- 为什么:视窗移动会占用大量线程时间
- GDI+提供了非托管和托管两种API吗?
- 请问如何改变PropertySheet中的"确定"与"取消"按钮的位置?
- "Cannot add new number."是怎么一回事?
- 求一个VC++6.0的软件下载网址。新手求教。找师傅
- 我想在MDI的背景中显示一个图片,但在加入如下代码时,图片一闪而过,有什么好办法呢?
- _mm_shuffle_epi32 这条指令是什么意思啊 ?
- 如何对一个CArray进行排序? 能提供一个实例吗?
- 设置CheckBox选中,请问怎么设置呢?
- 参数
调用此成员函数将编辑控件中的当前选定部分替换为由lpszNewText指定的文本。
内存的话应该不会减少
可以自己维护Edit控件文体缓冲区
具体步骤如下
1。Obtain a new buffer (and buffer handle) by calling LocalAlloc.
2。Give the buffer handle to the system by sending the control an EM_SETHANDLE
message
3。Retrieve the handle of the memory currently allocated for the text in a
multiline edit control by sending the control an EM_GETHANDLE message.
4。Free the buffer by calling the LocalFree function
其他参考msdn Allocating a Text Buffer