Public Group

# [Solved]Help making a VC++2005 express wizard

This topic is 4161 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

	&lt;SYMBOL NAME="WIN_APP" TYPE=checkbox VALUE=true&gt;&lt;/SYMBOL&gt; //this is for the radio button
&lt;SYMBOL NAME="GAME_APP" TYPE=checkbox VALUE=false&gt;&lt;/SYMBOL&gt; //these are for the check boxes
&lt;SYMBOL NAME="DEBUG_APP" TYPE=checkbox VALUE=false&gt;&lt;/SYMBOL&gt;
&lt;SYMBOL NAME="DIRECT_3D_APP" TYPE=checkbox VALUE=false&gt;&lt;/SYMBOL&gt;

//you can change this to have it say what ever you want
&lt;TD VALIGN="TOP" HEIGHT="65"&gt;
&lt;H4 CLASS="HEAD" ID="HEAD"&gt;Welcome to the Win32 Game Application Wizard</H4>
&lt;P CLASS="SUBHEAD" ID="SUBHEAD"&gt;This wizard generates a Win32 application project. The project can be a Windows application, a Game Loop, a Debug, or Direct 3D.</P>
&lt;/TD&gt;

//also this

&lt;SPAN CLASS="ACTIVELINK" ID="AppSettings" TITLE="Specify the type of application you will build with this project and the options or libraries you want supported." onClick="Next(document, 'AppSettings.htm');" TABINDEX="1"&gt;Application Settings&lt;/SPAN&gt;

&lt;SPAN CLASS="ItemTextTop" ID="PROJECT_SETTINGS_SPAN"&gt;These are the current project settings:&lt;/SPAN&gt;

&lt;SPAN CLASS="ItemText" ID="FinishText"&gt;Click Finish from any window to accept the current settings.&lt;/SPAN&gt;

&lt;SPAN CLASS="ItemText" ID="README_REMINDER" TITLE=""&gt;After you create the project, see the project's readme.txt file for information about the project features and files that are generated.&lt;/SPAN&gt;


//the meet of the file
function InitDocument(document)
{
setDirection();

{
if("true" == window.external.FindSymbol("Windows_TYPE_ONLY"))
{
}
var L_WizardDialogTitle_Text = "Win32 Game Application Wizard";
var strProjName = window.external.FindSymbol("PROJECT_NAME");
var coll = document.all.tags("SYMBOL");
var numSymbols = coll.length;
for (i = 0; i &lt; numSymbols; i++)
{
var obj = coll(i);
if (typeof(obj.VALUE) == "undefined")
{
obj.VALUE = getval(obj, strProjName);
}
}
SetLocaleForResources(window.external.GetHostLocale());
window.external.SetDefaults(document);
}
InitControls();
}

function InitControls()
{
var L_APPTYPEWIN_TEXT = "Windows App";
var L_APPTYPEDLL_TEXT = "Game Loop";
var L_APPTYPECON_TEXT = "Debug";
var L_APPTYPELIB_TEXT = "Direct 3D";

if (window.external.FindSymbol("GAME_APP"))
APPTYPE.innerText = L_APPTYPEDLL_TEXT;
else
{
if (window.external.FindSymbol("DEBUG_APP"))
APPTYPE.innerText = L_APPTYPECON_TEXT;
else
{
if (window.external.FindSymbol("DIRECT_3D_APP"))
APPTYPE.innerText = L_APPTYPELIB_TEXT;
else
APPTYPE.innerText = L_APPTYPEWIN_TEXT;
}
}
}


This is for the AppSettings.htm make sure this path is correct
&lt;LINK ID="LINKURL" REL="stylesheet" HREF="../../../1033/Newstyles.css"&gt;

Also make sure this file is in your images folder. You can make a and name it what ever you want aslong as it coorspondes here and is about the same size

&lt;TD CLASS="IMAGE" VALIGN="BOTTOM" WIDTH="110" ROWSPAN="2"&gt;
&lt;DIV CLASS="SMALLA" ID="WIN_APP_IMAGE" style="DISPLAY:BLOCK;"&gt;
<IMG CLASS="SMALL" SRC="..\..\Images\WindowsApp.gif" ALT="" BORDER="0"></DIV>


Make sure the spacer.gif is in your images folder also and it and the above image can be taken from one of the other image folders for the other wizards this is for your major application types that appear as radio button on the wizard so you can choose it or another major app type but not both and as long as you note the ID and make sure every thing coorsponds you can have as many as you want
&lt;INPUT TYPE="radio" CLASS="Radio" onPropertyChange="InitControls();" NAME="apptype" ID="WIN_APP" ACCESSKEY="W" TITLE="Creates a simple Windows application. The application files include a &lt;projectname&gt;.cpp file that contains the _tWinMain function, and stdafx.cpp and stdafx.h files that are used to create the precompiled header file."&gt;
&lt;DIV CLASS="itemTextRadioB" ID="WIN_APP_DIV" TITLE="Creates a simple Windows application. The application files include a &lt;projectname&gt;.cpp file that contains the _tWinMain function, and stdafx.cpp and stdafx.h files that are used to create the precompiled header file."&gt;
&lt;LABEL FOR="WIN_APP" ID="WIN_APP_LABEL"&gt;<U>W</U>indows application&lt;/LABEL&gt;
</DIV>


these are the check boxes that alow you to add more files or functionality to your app that you choose above

&lt;INPUT TYPE="checkbox" CLASS="CheckBoxA" ACCESSKEY="G" ID="GAME_APP" TITLE="This option creates a .vcproj file based on the project name you specified but adds no files to it. Use this when you intend to supply all your own source files." onPropertyChange="OnEmptyProject();"&gt;
&lt;DIV CLASS="itemTextCheckboxB" TITLE="This option creates a .vcproj file based on the project name you specified but adds no files to it. Use this when you intend to supply all your own source files." ID="GAME_APP_title"&gt;
&lt;LABEL FOR="GAME_APP" ID="GAME_APP_LABEL"&gt;<U>G</U>ame Loop&lt;/LABEL&gt;
</DIV>

&lt;INPUT TYPE="checkbox" CLASS="CheckBoxA" ACCESSKEY="D" ID="DEBUG_APP" TITLE="For DLL project only; specifies that the DLL will export symbols."&gt;
&lt;DIV CLASS="itemTextCheckboxB" TITLE="For DLL project only; specifies that the DLL will export symbols." ID="DEBUG_APP_title"&gt;
&lt;LABEL FOR="DEBUG_APP" ID="DEBUG_APP_LABEL"&gt;<U>D</U>ebug&lt;/LABEL&gt;
</DIV>

&lt;INPUT TYPE="checkbox" CLASS="CheckBoxA" ACCESSKEY="I" ID="DIRECT_3D_APP" TITLE="Specifies use of a

&lt;DIV CLASS="itemTextCheckboxB"
TITLE="Specifies use of a precompiled header file." ID="DIRECT_3D_APP_title"&gt;
&lt;LABEL FOR="DIRECT_3D_APP"
ID="DIRECT_3D_APP_LABEL"&gt;D<U>i</U>rect 3D&lt;/LABEL&gt;
</DIV>


as you can see the pattern you can have as many as you want again this is the meet of your file
function InitControls()
{
GAME_APP.disabled = true;
GAME_APP_title.disabled = true;
DEBUG_APP.disabled = true;
DEBUG_APP_title.disabled = true;
DIRECT_3D_APP.disabled = true;
DIRECT_3D_APP_title.disabled = true;

if (WIN_APP.checked)
{
GAME_APP.disabled = false;
GAME_APP_title.disabled = false;
DEBUG_APP.disabled = false;
DEBUG_APP_title.disabled = false;
DIRECT_3D_APP.disabled = false;
DIRECT_3D_APP_title.disabled = false;

}

if (window.external.FindSymbol("IS_EXPRESS_SKU"))
{
WIN_APP.disabled = false;
WIN_APP_LABEL.disabled = false;
}

OnEmptyProject();
ToggleImage();
}

function OnEmptyProject()
{
if (WIN_APP.checked)
{

GAME_APP.disabled = false;
GAME_APP_title.disabled = false;
DEBUG_APP.disabled = false;
DEBUG_APP_title.disabled = false;
DIRECT_3D_APP.disabled = false;
DIRECT_3D_APP_title.disabled = false;
}

if (window.external.FindSymbol("IS_EXPRESS_SKU"))
{

}
}


Next folder is the image folder I already told you what goes in there above so on to the folder Scripts\1033 which has one file in it called default.js a java script file that the above htm's load here you add in the files that you want to be copyed into your project WARNING: They can not be empty or it will not pull the file and it will crash Between /// these // are the files I added. if (strName == "gamemain.h") strTarget = "GameMain.h"; first line is the exact file name and it is case sensitive as far as I can tell second line is what it will apear in your project
function GetTargetName(strName, strProjectName, strResPath, strHelpPath)
{
try
{
var strTarget = strName;

if (strName == "readme.txt")
if (strName == "resource.h")
strTarget = "Resource.h";
//warning warning files to be added can not be empty
if (strName == "gamemain.h")
strTarget = "GameMain.h";

if (strName == "gamemain.cpp")
strTarget = "GameMain.cpp";

if (strName == "Debug.h")
strTarget = "Debug.h";

if (strName == "Debug.cpp")
strTarget = "Debug.cpp";

if (strName == "D3DGFX.h")
strTarget = "D3DGFX.h";

if (strName == "D3DGFX.cpp")
strTarget = "D3DGFX.cpp";
/////////////////////////////////////////////////////////////
if (strName == "resource.h")
strTarget = "Resource.h";

if (strName == "small.ico")
{
strTarget = "small.ico";
}
if (strName.substr(0, 4) == "root")
{
strTarget = strProjectName + strName.substr(4);

}
return strTarget;
}
catch(e)
{
throw e;
}
}


This next line translates your main apps name to the one it will use so if you have more then one make sire it is added in here
function GetAppType()
{
try
{
var strAppType = "";
if (wizard.FindSymbol("WIN_APP"))
strAppType = "WIN";
return strAppType;
}
catch(e)
{
throw e;
}
}


And that is about it for this file On to the next folder templates\1033 only thing to note here is that all your files need to be in here that you will be using in your project also you have a Templates.inf folder tells the script what files to copy when
[!if WIN_APP] // the main app
CopyOnly | small.ico
CopyOnly | root.ico
OpenFile | root.cpp
resource.h
root.rc
root.h
[!endif]

[!if Game_APP] //sub files to include if they have been checked
gamemain.h
gamemain.cpp
[!endif]

[!if DEBUG_APP]
Debug.h
Debug.cpp
[!endif]

[!if DIRECT_3D_APP]
D3DGFX.h
D3DGFX.cpp
[!endif]


This is my first tutorial type post and hopfuly people found this imformateive and enjoyed it. If there is any issues with it let me know so I can fix it. There is a lot more adavnde things you can do like depending on the check box that has been checked will alow you to check any other one and if you know java script really well which I dont you can do just about anything. Here is my Example [Edited by - kingpinzs on July 25, 2007 8:14:45 PM]

##### Share on other sites
Well after 5 hours I have figured out how to do it.

If any one is intrested in how to make there own wizard in express vertion I will Post how if not the saying I figured out how

##### Share on other sites
Quote:
 Original post by kingpinzsIf any one is intrested in how to make there own wizard in express vertion I will Post how

I'm interested. [smile]

##### Share on other sites
Quote:
 Original post by kingpinzsWell after 5 hours I have figured out how to do it.If any one is intrested in how to make there own wizard in express vertion I will Post how if not the saying I figured out how

Don't even ask - post it right now [grin].

##### Share on other sites
I am righting out the instructions now. I am learning a little java script while I am doing it. next post will be the complete instructions I am just working out the bugs now.

##### Share on other sites
I posted the info above but I thinck it will be easyer if I just linked a text document for people to read also the sample zip files is included. Comments wanted on how well the info was presented and if anything can be changed to make it better

1. 1
2. 2
3. 3
4. 4
Rutin
15
5. 5

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633724
• Total Posts
3013556
×