Skip to content

Latest commit

 

History

History
58 lines (49 loc) · 1.69 KB

File metadata and controls

58 lines (49 loc) · 1.69 KB
title Adding a Method (Visual C++) | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-ide
ms.tgt_pltfrm
ms.topic article
dev_langs
C++
helpviewer_keywords
Add Method Wizard [C++]
methods [C++], adding
ms.assetid 4ba4e45f-fa38-4d5e-af44-cbec0a7ab558
caps.latest.revision 6
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

Adding a Method (Visual C++)

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.

To add a method to your object

  1. 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.

  2. Right-click the name of the interface.

  3. On the shortcut menu, click Add, and then click Add Method.

  4. In the Add Method Wizard, provide the information to create the method.

  5. Specify any interface definition language settings for this method in the IDL attributes page of the wizard.

  6. Click Finish to add the method.

See Also

Creating a COM Interface
Editing a COM Interface