ActiveX in VC ++ without MFC?

I am wondering if it is possible to create an ActiveX control without using the MFC ActiveX that is provided in VS2010? I prefer to code completely from scratch without any predefined or generated content. All ActiveX manuals are based on the use of MFC, and all generated code is rather confusing and difficult to understand and fully understand.

I'm also not very used to the MFC syntax, I am looking for something similar to standard C ++ against win32 api. As far as I understand, ActiveX components can be developed in languages ​​other than MFC, such as C. I would like to use standard C / C ++, but I can not find any resources on how to make minimal ActiveX from scratch.

Hope I made it clear enough.

Thanks.

+4
source share
4 answers

True, you do not need MFC (or any other infrastructure) to develop ActiveX controls, but there is a good reason why you cannot find examples of how to do this. This is incredibly hard to do. My suggestion is to take the time to explore the infrastructure that supports ActiveX and implement an ActiveX control. You will need a lot more time.

In addition, if you go without you, you will soon find out how much the boiler plate code is . All IMO templates deserve the use of MFC and the wizards that generate all the forest code.

+3
source

Another alternative is to use ATL. Creating an ActiveX control from scratch without any frameworks is far from trivial.

+7
source

ATL and WTL, I like these frameworks, the MFC mess, small executables, and very flexible.

+2
source

Old VB 6.0 was the easiest environment for Active-X controls I've seen. And now "free," I think. The only problem is that they always had a β€œform” or presence of a GUI. Therefore, for invisible controls a little pain. Check these links anyway: ActiveX Control Fundamentals: Visual Basic Programming Examples

0
source

Source: https://habr.com/ru/post/1344793/


All Articles