CCustomAppWiz::m_Dictionary
| Overviews | How Do I | Details |
Feature Only in Professional and Enterprise Editions Creating a Custom AppWizard is supported only in Visual C++ Professional and Enterprise Editions. For more information, see .
project**aw.m_Dictionary[“macroname”] = “value”;
projectaw.m_Dictionary.RemoveKey(“macroname”);
Parameters
project
The name of your project as specified on the Projects tab of the New dialog box.
“macroname”
Pointer to the current step. The quotations marks are required.
“value”
Any value that makes sense for your application. The macro exists if it has a value assigned to it. The quotations marks are required.
Remarks
Use the m_Dictionary data member (the dictionary), which is of the type , to create macros, remove macros, or update the value of macros. Some macros are supplied by MFCAPWZ.DLL and some by you. The CCustomAppWiz::ProcessTemplate member function uses the dictionary to map macros that it encounters while parsing custom resource templates to their actual values. For more information on the macros supplied by MFCAPWZ.DLL, see Standard AppWizard Macros.
Typically, you will call the dictionary’s member functions (which are provided by ) in a custom step’s OnDismiss function.
Each of your custom AppWizard’s custom steps is a dialog box that is represented by a class. Each step’s class has an OnDismiss member function that is called whenever the user of a custom AppWizard chooses Back, Next, or Finish. After you use the dialog resource editor to add controls to your custom steps, use ClassWizard to add variables to each step’s class. In this way, you can take advantage of the dialog data exchange (DDX) code that ClassWizard adds to your class.
Typically, you will add code in each OnDismiss function that defines, provides values for, or removes macros as follows:
BOOL CStep1Dlg::OnDismiss()
{
if (!UpdateData(TRUE))
return FALSE;
else
{
if (!m_Indented)
{
myaw.m_Dictionary["INDENTED_BRACES"]="";
myaw.m_Dictionary["NOT_INDENTED_BRACES"]="Yes";
}
else
{
myaw.m_Dictionary["INDENTED_BRACES"]="\t";
myaw.m_Dictionary.RemoveKey("NOT_INDENTED_BRACES")=;
}
if (m_CompanyLogo)
myaw.m_Dictionary["COMPANY_LOGO"]="Yes";
else
myaw.m_Dictionary.RemoveKey("COMPANY_LOGO");
if (m_3DControls)
myaw.m_Dictionary["3-D"]="Yes";
else
myaw.m_Dictionary.RemoveKey("3-D");
return TRUE; // return FALSE if the dialog
// shouldn't be dismissed
}
}
See Also CCustomAppWiz Overview, Class Members, CAppWizStepDlg::OnDismiss, CustomAppWiz::ProcessTemplate, Standard AppWizard Macros