How to pass optional arguments to a method on an ActiveX Control (154039)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q154039 Note Microsoft Visual C++ .NET (2002) supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. The information in this article applies only to
unmanaged Visual C++ code. SUMMARY Many automation methods on ActiveX Controls do not require
that all possible arguments are passed with each call. Arguments that are not
required are called optional arguments. In MFC, it is possible to add a method
to a custom control that accepts optional arguments, but there are a few rules
that must be followed. This article outlines these rules, and provides
step-by-step instruction on how to add such a method to a control.
REFERENCES
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
140616
MFCDISP: Replacing MFC IDispatch implementation
For more information, see the following resources: - Visual C++ Books Online
- Programming with MFC:
Encyclopedia
Modification Type: | Major | Last Reviewed: | 9/1/2005 |
---|
Keywords: | kbAutomation kbCtrlCreate kbhowto KB154039 kbAudDeveloper |
---|
|