I'm wondering if it is possible to create an ActiveX control without using the MFC ActiveX that is provided in VS2010? I prefer to do the code entirely from scratch without any predefined or generated co开发者_如何学JAVAntent. All the guides on ActiveX are based on using MFC and all the generated code is quite confusing and hard to get a grasp on and fully understand.
I am also not very used to the MFC syntax, I am looking for something akin to standard c++ against the win32 api. As I understand it, ActiveX components can be developed in other languages aswell apart from MFC, such as C. I would like to use standard C/C++ but I can't find any resources on how to do a very minimal ActiveX from scratch.
Hope I made it clear enough.
Thanks.
Another alternative is to use ATL. Making an ActiveX control from scratch without any frameworks is far from trivial.
True, you don't need MFC (or any other framework) to develop ActiveX controls but there's a good reason you're not finding examples on how to do it without. It's incredibly tough to do so. My suggestion is to take the time to learn a framework that supports ActiveX and implement the ActiveX control. It will take you much, much longer to go without.
Besides, if you go without you will soon discover how much boiler plate code is involved. All the boilerplate alone, IMO, is worth using MFC and the wizards that generate all the scaffolding code.
ATL and WTL, I love those frameworks, no MFC mess, small executables and very flexible.
The old VB 6.0 was the easiest best environment for Active-X controls I have seen. Also now "free" I believe. The only problem being that they always had a "form" or GUI presence. So for non-visible controls a bit of a pain. Anyway checkout these links: Basic Principles of ActiveX Controls: Visual Basic Programming Examples
精彩评论