I understand how to create a ATL Project + ATL Simple Object to add COM components to Visual Studios 2015 project, but I don't understand at all how to create a MFC COM Project. If someone can create an example MFC COM project for me I would highly appreciate it.
Visual Studios 2015 is being used because in 2017 there are issues when using the class wizards for MFC and ATL and in 2019 they don't have an MFC option, so 2015 is the more stable one.
I have created an MFC Dialog before, I have created COM interfaces using ATL, at least through the wizards.
When I mean by adding COM components to VS project, when you use the class wizard to add a ATL Simple Object class, when you are defining the class name, it will also define the COM class names and within their appropriate .h file, there are the macros and definitions such as COM_INTERFACE_ENTRY which I assume for MFC is BEGIN_DISPATCH_MAP. Pretty much using ATL Project + ATL Simple Object Class creates the skeleton code for COM programming using ATL. I want that for MFC but I have researched a lot and I don't know how to achieve it, but I guess my last resort is to use Win32 API. Only problem is, I have an MFC dialog I need to make a COM object out of and I don't know how to do that with MFC.
I have already viewed this tutorial along with many tutorials online. The issue with this one is, that it does not deal with IDL Interfaces and that is important for COM Objects.