简体   繁体   English

如何在 CView 中显示我的 ATL 控件

[英]How can I display my ATL control in CView

I have made an ATL control (ActiveX) and I can display it easily in MFC CDialog .我制作了一个 ATL 控件 (ActiveX),我可以在 MFC CDialog中轻松地显示它。 Now I need to display it in CView of MFC single document project by using the code (just like the picture below).现在我需要使用代码在MFC单文档项目的CView中显示(如下图)。 Don't use CForm because my customer don't need it.不要使用CForm ,因为我的客户不需要它。 They need exactly Control display in CView by code.他们需要通过代码在CView中精确控制显示。

Are there any tutorial or suggestion for this task?这个任务有什么教程或建议吗?

在此处输入图像描述

The MFC CView class doesn't directly support hosting of Win32 or ActiveX controls on its surface. MFC CView 类不直接支持在其表面上承载 Win32 或 ActiveX 控件。 That functionality is built into the CFormView class.该功能内置于 CFormView 类中。 If you want to readily host controls on your view, you should be using CFormView .如果您想在视图上轻松托管控件,则应该使用CFormView

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM