Creating an Interface

OverviewHow Do I ... Topics

Visual C++ provides many convenient wizards and other methods to assist you in defining interfaces and dispinterfaces for your COM objects and automation classes.

  • Use Step 3 of this wizard to create automation-enabled MFC classes. For document-based applications, the Wizard defines a dispinterface in the .odl file and implements it in the document class. For dialog-based applications, the dispinterface is implemented in the dialog class.

  • Use this wizard to create an ActiveX Control with a dispinterface and an event map defined in the .odl file and the control class, respectively.

  • Use this wizard to create a skeleton ATL–based project. This wizard generates .idl source and a COM map in the project classes. You can then use the to add various supported object types to this project. The ATL Object Wizard is available from ClassView, WizardBar, and the Insert menu.

  • ClassView

    Use the New Class or New ATL Object commands to create and define COM interfaces for ATL or MFC classes. Use the Implement Interface command to add interfaces to existing ATL objects. Use the Implement Connection Point command to define outgoing interfaces for existing ATL objects. You can also .

  • Use ClassWizard to create an automation-enabled class, and then use the Automation tab to define methods and properties for the class.

What do you want to do?

Edit an existing interface