Editing COM Interfaces

OverviewHow Do I ... Topics

By using commands from the ClassView shortcut menu, you can easily define new methods and properties for the COM interfaces in your Visual C++ projects. In addition, you can define events for ActiveX controls.

For ATL- and MFC-based COM object classes, you can edit the class implementation at the same time that you edit the interface.

Note   For interfaces that you have defined outside of the ATL Object Wizard, the New Class dialog box, or the MFC ClassWizard, Visual C++ adds the methods or properties to the .idl or .odl file, but doesn’t directly modify your implementation class.

You can use the Add Method, Add Property, and Add Event dialog boxes, available from ClassView, to customize existing interfaces. Visual C++ detects the project type, and modifies the options in the dialog boxes accordingly:

What do you want to do?

Add a method to an interface or non-MFC dispinterface

Add a method to an MFC dispinterface

Implement a connection point for an ATL object

Add a property to an interface or non-MFC dispinterface

Add a property to an MFC dispinterface

Add a method, property, or event to an MFC ActiveX control