Article ID: 154039 - Last Review: November 21, 2006 - Revision: 4.1 How to pass optional arguments to a method on an ActiveX ControlThis 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.
MORE INFORMATION MFC's implementation of IDispatch accepts optional
arguments according to the following rules:
REFERENCES
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
140616
(http://support.microsoft.com/kb/140616/
)
MFCDISP: Replacing MFC IDispatch implementation
For more information, see the following resources:
APPLIES TO
| Article Translations
|

Back to the top
