Share via


CCustomAppWiz::InitCustomAppWiz

OverviewsHow Do IDetails

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 .

virtual void InitCustomAppWiz();

Remarks

The MFC AppWizard (MFCAPWZ.DLL) calls the InitCustomAppWiz member function just after loading a custom AppWizard. This occurs immediately after a custom AppWizard user has selected your custom AppWizard from the list on the Projects tab in the New dialog.

This****function provides a place for you to perform any initialization required by the custom AppWizard, such as setting internal structures to default values and allocating an instance of each CAppWizStepDlg class. These instances will later be returned to the MFC AppWizard when it calls your custom AppWizard’s Next and Back functions.

You can also override default MFC AppWizard settings in InitCustomAppWiz by modifying the contents of the dictionary. For example, if your company or customer requires that context-sensitive help be a default feature, you can add “HELP” to the dictionary, from within InitCustomAppWiz, and cause the MFC AppWizard’s Context-Sensitive Help check box to be selected by default. This example, of course, assumes that your custom AppWizard uses the relevant standard MFC AppWizard step and associated templates.

The base-class version of InitCustomAppWiz does nothing.

A custom AppWizard creates an executable file by default. If your custom AppWizard creates a DLL, set the standard AppWizard macro “PROJTYPE_DLL” in the InitCustomAppWiz function as follows:

YourProjectNameaw.m_Dictionary[“PROJTYPE_DLL“] = “1“;

This code informs MFCAPWZ.DLL to create a project makefile that builds a DLL rather than an executable file. The MFC AppWizard (MFCAPWZ.DLL) automatically generates this code if you create a custom AppWizard based on the standard MFC AppWizard steps for creating a DLL. Note that MFCAPWZ.DLL only checks that “PROJTYPE_DLL” exists and has a value, the actual macro value is not important unless your custom AppWizard requires that it have meaning.

See Also   CCustomAppWiz Overview, Class Members, CCustomAppWiz::ExitCustomAppwiz, CCustomAppWiz::Back, CCustomAppWiz::Next, The Dictionary, CAppWizStepDlg::CAppWizStepDlg