Overview | How Do I ... Topics
You can define new methods for MFC-based ActiveX control interfaces. When defining methods for control interfaces, you can create your own method, choose from a list of stock methods for the control, or customize a stock method. When you choose a stock method without customizing it, Visual C++ creates a definition for the method in the .odl file, but does not generate any implementation code in your class (.cpp or .h) files.
To add a method to an MFC ActiveX control
To create your own method, type in a unique name. If you choose from the list, you can either use the stock implementation or customize it. The name you specify here is reflected in the Internal name box.
The Internal name box is not available for stock implementations of stock methods.
You cannot alter the return type for stock methods.
The new method is displayed as an icon in ClassView under the dispinterface where it is defined. For custom methods, or stock methods with custom implementations, it is also displayed under the class that implements it. You can double-click the icon under the dispinterface to jump to the .odl file, and you can double-click the icon under the class to jump to the .cpp file.