Article ID: 822332 - View products that this article applies to.
When you use the Add Member Variable Wizard in Visual C++ .NET to add a variable to a Dialog control, you may receive the following error messages:
Error: Invalid procedure call or argument
Visual C++ .NET 2003 Internet Explorer script error
An error has occurred in the script on this page. Line: 480 Char: 4 Error: Invalid procedure call or argument Code: 0 URL: file://C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\VCWizards\MemVariableWiz\HTML\1033\default.htm
Visual C++ .NET 2002 error
An error has occurred in the script on this page. Line: 480 Char: 4 Error: Invalid procedure call or argument Code: 0 URL: file://C:\Program Files\Microsoft Visual Studio .NET\Vc7\VCWizards\MemVariableWiz\HTML\1033\default.htm
This is a bug in the automation code for the DialogID property. Whenever any custom enum definitions appear before the AFX IDD enum in the header file, the Add Member Variable Wizard cannot find the dialog resource ID in the first enum definition in the Microsoft Foundation Class Library (MFC) CDialog class and an error message is displayed.
Move any custom enum definitions after the IDD enum so that the IDD enum appears first in the file if you search from the top down.
The following code example shows how to add the custom enum definition after the IDD enum definitions:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
Steps to reproduce the behavior
Contact us for more help
Connect with Answer Desk for expert help.