473,544 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Any Custom Appwizard experts out there?

tcr
Hi,
Not sure if this is the correct group so let me know. I am attempting to
create a new custom app wizard that will output one solution that contains
two projects. One is an MFC project and the other is a console. In the
OnFinish function of the default.js file, I create the one solution and then
cycle through the code twice to create the projects. Here is the code:

var strProjectPath = wizard.FindSymb ol('PROJECT_PAT H');
var strProjectName = wizard.FindSymb ol('PROJECT_NAM E');
var strMFCProjectNa me = strProjectName + "MFC";
var strConsoleProje ctName = strProjectName + "Console";
var strResFolder = strProjectPath + "\\res";
var Solution;

Solution = CreateSolution( strProjectName, strProjectPath) ;

//Create MFC project
//wizard.RemoveSy mbol('CON_PRJ') ;
selProj = CreateCustomPro ject(strMFCProj ectName, strProjectPath, Solution);
AddConfig(selPr oj, strMFCProjectNa me);
AddFilters(selP roj);
var oFSO = new ActiveXObject(" Scripting.FileS ystemObject");
if(!oFSO.Folder Exists(strResFo lder))
oFSO.CreateFold er(strResFolder );
var InfFile = CreateCustomInf File();
AddFilesToCusto mProj(selProj, strMFCProjectNa me, strProjectPath, InfFile);
PchSettings(sel Proj);
InfFile.Delete( );
selProj.Object. Save();

wizard.AddSymbo l("CON_PRJ",1,1 );
var strSymbol = "The symbol CON_PRJ is equal to " +
wizard.FindSymb ol("CON_PRJ");
wizard.OkCancel Alert(strSymbol );

//Create Console project
selProj = CreateCustomPro ject(strConsole ProjectName, strProjectPath,
Solution);
AddConfig(selPr oj, strConsoleProje ctName);
AddFilters(selP roj);

InfFile = CreateCustomInf File();
AddFilesToCusto mProj(selProj, strConsoleProje ctName, strProjectPath,
InfFile);
PchSettings(sel Proj);
InfFile.Delete( );

selProj.Object. Save();
I'm trying to use the symbol 'CON_PRJ' in the Templates.inf file so that
it will add the appropriate. Here is the contents of that file:

TestClass.h
TestClass.cpp
stdafx.h
stdafx.cpp
[!if CON_PRJ == 1]
rootConsole.cpp
[!else]
rootmfc.h
rootmfc.cpp
resource.h
rootmfc.rc
res\\rootmfc.rc 2
res\\rootmfc.ic o
[!endif]

You will notice that I add the symbol before creating the console
project and then output its value for debugging purposes. The problem is
that if I define it after a call to RenderTemplate in the CreateCustomInf File
function it indicates that the symbol is undefined. If I define it before,
it remains defined. This means that the projects are created from two
template files that are exactly the same. I can't update the symbol table
after the first call to CreateCustomInf File. Anyone have any suggestions?
Thanks,
tcr
Jul 25 '05 #1
0 1065

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3058
by: Lt | last post by:
Hello, I'm gonna write my first 3D multiplayer game using DirectPlay, VC++ ..NET 2002. I've done tutorials supplied along with DXSDK Then I wanted to use the DirectX AppWizard but it produced over 2300 lines of code! It's cool to have prepared automatically all initializations but it's a little too much. That's because I can't find any...
2
343
by: Jiho Han | last post by:
I've written some before but never ran into this. I happened to write a simple custom ConfigurationSectionHandler implementation in my single .exe file. Thinking since it's in the executing assembly I can forget the assembly name. It didn't work. I had to specify the .exe assembly in order for it to load. Can someone explain? Thanks ...
1
2283
by: znmaster | last post by:
I've downloaded WTL7.0 from http://msdn.microsoft.com, and installed it according to the instructions. But I can't see the WTL Appwizard in VC++.net. I use Windows2000. Can WTL7.0 only be used under WinXP? Thanks
0
1046
by: tcr | last post by:
Hi, Not sure if this is the correct group so let me know. I am attempting to create a new custom app wizard that will output one solution that contains two projects. One is an MFC project and the other is a console. In the OnFinish function of the default.js file, I create the one solution and then cycle through the code twice to create...
1
1602
by: John Gabriel | last post by:
I have set up a website and am testing ASPs. I have created a very simple ActiveX component with two interfaces: AboutBox() - displays About details calcpi() - returns 3.14159 Here is my configuration (All the most up to date versions except for Visual C++): Windows XP (Home Edition).
1
1057
by: finalyvn | last post by:
I read some books in school and I found out that all these books taught only one thing APPWIZARD and it wrote MFC code. But if I use this function , Wizard raised more file (more complicated). Now,I want to do this without APPWIZARD like Win32 Programming by using empty project. Appreciate for any answer Thanks
0
792
by: tcr | last post by:
Hi, Not sure if this is the correct group so let me know. I am attempting to create a new custom app wizard that will output one solution that contains two projects. One is an MFC project and the other is a console. In the OnFinish function of the default.js file, I create the one solution and then cycle through the code twice to create...
11
10088
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I have worked with application settings in VS2005 and C# for awhile, but usually with standard types. I have been trying to store a custom container/class/type in an application setting and I have seen erratic results. I am aware of one known defect where user classes do not show up in the list of types on the Property/Settings page in the...
0
7356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7597
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7358
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5894
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4902
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3396
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
980
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.