Share via


NEWPROJ.INF

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 .

NEWPROJ.INF contains the instructions that MFCAPWZ.DLL uses to construct a custom AppWizard user’s project. The instructions are statements, directives, and macros that work together to describe the structure of a project. The following code shows how statements and macros are used to generalize the instructions of a NEWPROJ.INF file:

dlgroot.rc   .\$$ROOT$$.rc
dlgroot.clw   .\$$ROOT$$.clw
dlgroot.h   .\$$ROOT$$.h
dlgroot.cpp   .\$$ROOT$$.cpp
dialog.h   .\$$ROOT$$dlg.h
dialog.cpp   .\$$ROOT$$dlg.cpp
readme.txt   .\readme.txt
resource.h   .\resource.h
stdafx.h   .\stdafx.h
stdafx.cpp   .\stdafx.cpp
/RES
:=root.ico   .\res\$$ROOT$$.ico
:root.rc2   .\res\$$ROOT$$.rc2

In general, there are two kinds of NEWPROJ.INF statements: those that create directories, and those that fill the directories with files. In the previous example, the /RES statement causes MFCAPWZ.DLL to create a project subdirectory named RES. The dlgroot.rc  .\$$ROOT$$.rc statement causes MFCAPWZ.DLL to look for a custom resource template named DLGROOT.RC, give it a name determined by the value of the $$ROOT$$ macro, and place the resulting file in the new project’s root directory. The file is added to the project, so that it will be part of the build process when the user builds the project.  For more information on the NEWPROJ.INF statements, see NEWPROJ.INF Statements.

For brevity, directives (such as $$IF, $$ELSE, and $$ENDIF) are not shown in the previous example, but they can be used as shown in the CONFIRM.INF example. For more information on directives, see Standard AppWizard Directives. For more information on macros, see How Macros Get Their Values.

What do you want to know more about?