Adding a New Interface in an ATL Project
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
When you add an interface to your object or control, you create stubbed-out functions for each method in that interface. In your object or control, you can add only interfaces currently found in an existing type library. Also, the class in which you add the interface must implement the BEGIN_COM_MAP macro or, if the project is attributed, it must have the
You can add a new interface to your control in one of two ways: manually or using code wizards in Class View.
In Class View, right-click the class name of a control. For example, a full control or composite control, or any other control class that implements a BEGIN_COM_MAP macro in its header file.
On the shortcut menu, click Add, and then click Implement Interface.
Select the interfaces to implement in the Implement Interface Wizard. If the interface does not exist in any available typelib, then you must add it manually to the .idl file.
Add the definition of your new interface to the .idl file.
Derive your object or control from the interface.
Create a new COM_INTERFACE_ENTRY for the interface or, if the project is attributed, add the
Implement methods on the interface.
ATL Project Wizard
Visual C++ Project Types
Creating Desktop Projects By Using Application Wizards
Programming with ATL and C Run-Time Code
Fundamentals of ATL COM Objects
Default ATL Project Configurations