Adding a Property (Visual C++)
You can use the Add Property Wizard to add a method to an interface in your project.
To add a property to your object
In Class View, right-click the name of the interface to which you want to add the property.
You can also add properties to dispinterfaces, which, unless the project is attributed, are nested within the library node.
From the shortcut menu, click Add, and then click Add Property.
In the Add Property Wizard, provide the information to create the property.
Specify any interface definition language (IDL) settings for the property in the IDL Attributes page of the wizard.
Click Finish to add the property.
The Get and Put methods of the property are displayed as two icons in Class View, under the interface where it is defined. You can double-click either icon to view the property declaration in the .idl file.
For ATL interfaces, the Get and Put functions are added to the .cpp file, and references to these functions are added to the .h file.
For MFC dispinterfaces, if you select Member variable as the implementation type, a method and a variable are added to the class that implements it. If you select Get/Set methods as the implementation type, two methods are added to the class that implements it.