I have an ActiveX control container that only accepts a predefined set of interfaces (properties). I need to design quite a few MFC ActiveX controls that expose those properties, so my initial attempt was to create an interface class that contains all the required properties as pure virtual members and all my ActiveX control inherit from this interface class. Now my ActiveX control have all the interfaces inherited, but how can I expose them to the container? If I use the class wizard to add those properties, I know I can expose them. But the whole point is to avoid adding them one by one for each ActiveX control. If I don't use the class wizard, this will mean that I have to manually modify the BEGIN_DISPATCH_MAP() & END_DISPATCH_MAP() section and the corresponding .ODL file, which I don't think is a good thing to do.
So my question is, using MFC, how can I inherit an abstract class (interface class) to implement all the predefined properties (interfaces) for an ActiveX control and expose them to the user?
Example: Say my base class A has a property defined as: long newProperty. And my ActiveX control B inherit from A, so B also has newProperty. My question is how to expose newProperty in B? How can I have get and set functions for this new property like using the Class Wizard? And do I have to manually modify BEGIN_DISPATCH_MAP() & END_DISPATCH_MAP() section and the corresponding .ODL file?