| title | Adding a Method (Visual C++) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 11/04/2016 | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | article | ||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 4ba4e45f-fa38-4d5e-af44-cbec0a7ab558 | ||
| caps.latest.revision | 6 | ||
| author | mikeblome | ||
| ms.author | mblome | ||
| manager | ghogen |
You can use the Add Method Wizard to add a method to an interface in your project. If the project contains a class associated with the interface, the wizard modifies the class, too.
-
In Class View, expand the project node to display the interface to which you want to add the method.
[!NOTE] You can also add methods to dispinterfaces, which, unless the project is attributed, are located under the library node.
-
Right-click the name of the interface.
-
On the shortcut menu, click Add, and then click Add Method.
-
In the Add Method Wizard, provide the information to create the method.
-
Specify any interface definition language settings for this method in the IDL attributes page of the wizard.
-
Click Finish to add the method.