How can I display my ATL control in CView

72 Views Asked by At

I have made an ATL control (ActiveX) and I can display it easily in MFC CDialog. Now I need to display it in CView of MFC single document project by using the code (just like the picture below). Don't use CForm because my customer don't need it. They need exactly Control display in CView by code.

Are there any tutorial or suggestion for this task?

enter image description here

1

There are 1 best solutions below

0
Ed Dore On

The MFC CView class doesn't directly support hosting of Win32 or ActiveX controls on its surface. That functionality is built into the CFormView class. If you want to readily host controls on your view, you should be using CFormView.