如何替换CRichEDitView的CRichEditCtrl [英] How to to replace the CRichEditCtrl of CRichEDitView

查看:108
本文介绍了如何替换CRichEDitView的CRichEditCtrl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有人可以告诉我如何在MFC中用我们自己的CRichEditCtrl派生类(可能具有一些附加功能)替换CRichEDitView的CRichEditCtrl.
谢谢
Dev

Hi,
Can anybody please tell me how to replace the CRichEditCtrl of CRichEDitView with our own CRichEditCtrl derived class (which may have some added functionality)in MFC.
Thanks
Dev

推荐答案

您无法替换控件,需要为此创建自己的视图类.

我看到的更快,最简单的选项是创建一个FormView而不是CRichEditView.使用仅包含您的自定义控件的窗体.然后,在您的FormView派生类中,处理调整大小的事件,以使控件占用表单中的所有空间.
You can''t replace the control, you need to make your own view class for that.

The faster and easiest option I see is to create a FormView instead of CRichEditView. Use a form that only contains your custom control. Then in your FormView derived class, handle resizing events to make your control take all space within the form.


这篇关于如何替换CRichEDitView的CRichEditCtrl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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