Editing a COM Interface
By using commands from the Class View shortcut menu, you can define new methods and properties for the COM interfaces in your Visual C++ projects. In addition, from the Toolbox, 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 Add Class dialog box, Visual C++ adds the methods or properties to the .idl file, and it add stubs to the classes that implement methods, even when the interfaces are added manually.
The following three wizards help you customize existing interfaces. They are available from Class View:
Wizard |
Project type |
---|---|
ATL or MFC projects supporting ATL. Right-click the interface to which you want to add the property. Visual C++ detects the project type and modifies the options in the Add Property Wizard accordingly:
|
|
ATL or MFC projects supporting ATL. Right-click the interface to which you want to add the method. Visual C++ detects the project type and modifies the options in the Add Method Wizard accordingly:
|
Additionally, you can implement new interfaces on your COM control by right-clicking the object's control class in Class View and clicking Implement Interface.
See Also
Concepts
Adding Functionality with Code Wizards