Article ID: 152482
Article Last Modified on 10/24/2003
APPLIES TO
- Microsoft Visual C++ 4.0 Standard Edition
- Microsoft Visual C++ 4.1 Subscription
- Microsoft Visual C++ 4.2 Professional Edition
This article was previously published under Q152482
SYMPTOMS
When using a Custom AppWizard that uses the Standard AppWizard step defined by APWZDLG_APPTYPE (generating an EXE), it is possible to get this error message:
CAUSE
This behavior occurs if the user did not explicitly select a language in the first step of the Custom AppWizard. Occasionally the language combo box will not initialize with a default language, and if the user does not select one, this error message can occur. If the user moves off the first step, and then back, the combo box will reset and select the first entry in the list as default.
For more information on a related bug, please see the following article in the Microsoft Knowledge Base:
152255 PRB: Custom AppWizard Doesn't Initialize Custom Step Dialogs
RESOLUTION
The selection of a language maps to the NUM_LANGS dictionary entry. You can add code to one of your custom dialog steps to ensure that this dictionary item is selected, and instruct the user to return to the first step. This forces the combo box to select a default language and ensures that it matches the user's expectations. This is only necessary for Custom AppWizards that use SetSupportedLanguages().
Code to confirm the definition of NUM_LANGS is in the More Information section below.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Visual C++, version 5.0.
MORE INFORMATION
Sample Code
BOOL CCustom1Dlg::OnDismiss() { ... // Sanity check -- did the user select a language??? // -- did the combo box select a default??? CString strTemp; CUSTOM_APP.m_Dictionary.Lookup(_T("NUM_LANGS"), strTemp); if ( strTemp == CString("0") ) { AfxMessageBox(_T("Please return to Step 1 of the wizard and " "select a language. Otherwise the wizard will " "not be able to generate your project." ); } }
Additional query words: WizardIss
Keywords: kbbug kbfix kbnoupdate kbvc500fix kbwizard KB152482