from:http://www.codeguru.com/cpp/v-s/devstudio_macros/customappwizards/article.php/c12775/Create-a-Visual-C-Wizard-for-Visual-Studio-2005.htm#page-1

Create a Visual C++ Wizard for Visual Studio 2005

Posted by Marius Bancila on October 30th, 2006

If you often create VC++ projects that are very similar, such as DLLs that follow some guidelines or rules for common integration in an application (like a plug-in based application), you might get tired of creating a default VC++ project and then doing the same changes to it over and over again. In that case, perhaps it's time for you to write a VC++ wizard that automatically generates all that you need to start doing work.

In this article, I'll show you how to create a simple wizard for a Win32 console-based application. This project template will have several particularities:

  • Uses precompiled headers, so stdafx.h and stdafx.cpp will be generated
  • Contains files for a dummy class that the user chooses to name; the name of the files will be the same as the class. These files will be placed inside a subfolder called 'src' that will be added to the Additional Include Directories property
  • Includes comments at the beginning of each file containing the author and the date of creation
  • Includes a file called main.cpp containing the main() function that will instantiate an object of the created class
  • In addition, a readme.txt text file should be generated, but not added to the list of project files

Creating the Project

To create a new wizard project, go to File > New > Project and select Visual C++, and then from the list of available templates customwiz. Let's call this project "DummyWin32Wizard", because after all, that's exactly what it is. You will be asked to select the settings for this project. First, put "DummyWin32Wizard" in the "Wizard Friendly Name" edit, check the "User Interface" checkbox, and set the number of pages of the wizard to 1, because that's all what we'll need.

 
 

When the project is created, it will have several created files that you can see in the following picture. The most important ones are described here:

  • Default.html: The file containing the HTML code for the wizard's interface pages
  • Default.js: The file containing the JScript code called by the framework when the wizard is run
  • Default.vcproj is a VC++ project file containing the minimum information for a project, such as project type, platforms, and list of configurations
  • DummyWin32Wizard.ico: The icon associated with the template in the list of VisualC++ templates
  • DummyWin32Wizard.vsz: The start point of the wizard. Itcontains information about the wizard project, such as name, path (either absolute or relative), or LCID. This file basically names a COM component that Visual Studio can use to create an item, and lists the parameters the component receives. You can read more about the file inMSDN. Default content of the file is:
    1. VSWIZARD 7.0
    2. Wizard=VsWizard.VsWizardEngine.8.0
    3. Param="WIZARD_NAME = DummyWin32Wizard"
    4. Param="ABSOLUTE_PATH = D:\Cilu\VC++\codeguru\articles\
    5. wizard\DummyWin32Wizard"
    6. Param="FALLBACK_LCID = 1033"
  • DummyWin32Wizard.vsdir: lists all the items and their properties that are displayed in the selection dialog and the corresponding .vsz file; the default content of the file is listed below:
    1. DummyWin32Wizard.vsz||DummyWin32Wizard|1|
    2. TODO:WizardDescription.||6777||DummyWin32Wizard

    The information listed in this file is:

    • DummyWin32Wizard.vsz: The relative path to the .vsz file
    • Optional GUID: A component that contains resources (not specified in the about string)
    • DummyWin32Wizard: The name of the template displayed in the list of available templates
    • 1: The sort priority for displaying the items in the list of available templates; items with lower numbers are displayed at the beginning of the list
    • TODO: Wizard Description: A string describing the wizard, shown in the status field
    • Optional GUID or path of a DLL: Contains the icon to be with the item in the list (not specified in the about string)
    • 6777: The resource ID of the icon in the component
    • Optional additional flags (not specified in the about string)
    • DummyWin32Wizard: The suggested base name for the item. A number is inserted before the extension of the item, if one exists. If DummyWin32Wizard is replaced, for instance, with <DummyWin32Wizard>, the wizard will not suggest any name and the user is forced to enter a name for the item

When you create the custom wizard project, Visual Studio automatically copies the files DummyWin32Wizard.ico, DummyWin32Wizard.vsd, and DummyWin32Wizard.vsdir in the folder VC\vcprojects of the Visual Studio 8 installation folder. That means that if you go to File > New > Project and select VisualC++ you'll already be able to create a project with it.

I would suggest changing the content of the DummyWin32Wizard.vsdir file to

  1. DummyWin32Wizard.vsz||DummyWin32Wizard|1|Just a training
  2. purpose wizard||6777||<DummyWin32Wizard>

and copying it to the VC\vcprojects folder, so that the templates dialog shows what you want.

Customizing the Wizard's User Interface

If you selected a user interface of one HTML page as suggested earlier, Visual Studio will add some default controls to this unique page. It is shown in the picture below:

[page1.png]

Base of the requirements that we decided for the template in the beginning, the settings page should allow the users to select the name of a dummy class to create and the name of the user (that generates the project). Thus, we should customize the from to look like this:

[page2.png]

This will make the wizard's settings page look like this:

[wizardpage.png]

If you want to fill in some values—for instance, the name of the author—before the page is displayed, you should put the code in the InitDocument() function.

  1. // This is an example of a function which initializes the page
  2. //
  3. functionInitDocument(document)
  4. {
  5. setDirection();
  6. if(window.external.FindSymbol('DOCUMENT_FIRST_LOAD'))
  7. {
  8. // This function sets the default symbols based
  9. // on the values specified in the SYMBOL tags above
  10. //
  11. window.external.SetDefaults(document);
  12. }
  13. // Load the document and initialize the controls
  14. // with the appropriate symbol values
  15. //
  16. window.external.Load(document);
  17. }

Using Template Files

In the beginning of this article, you learned that the application folder should contain the following items:

  • Src:
    • <Classname>.h
    • <Classname>.cpp
  • Stdafx.h
  • Stdafx.cpp
  • Main.cpp
  • <Projectname>.vcproj
  • Readme.txt (not added to the project file)

You will use templates to generate these files. If you look in the Templates\1033 folder, you will see three files; one of them is called Templates.inf. This file contains a list of template file that will be parsed in the JScript code during the execution. In this folder, you will add the following files:

BaseSample.cpp

  1. /************************************************
  2. * Author: [!output AUTHOR_NAME]
  3. * Date: [!output CURRENT_DATE]
  4. ************************************************/
  5. #include"stdafx.h"
  6. #include"[!output CLASS_NAME].h"
  7. int _tmain(int argc, _TCHAR* argv[])
  8. {
  9. [!output CLASS_NAME]* sample =new[!output CLASS_NAME];
  10. // do the stuff here
  11. delete sample;
  12. return0;
  13. }

SampleClass.h

  1. /************************************************
  2. * Author: [!output AUTHOR_NAME]
  3. * Date: [!output CURRENT_DATE]
  4. ************************************************/
  5. #pragma once
  6. class[!output CLASS_NAME]
  7. {
  8. public:
  9. [!output CLASS_NAME](void);
  10. ~[!output CLASS_NAME](void);
  11. };

SampleClass.cpp

  1. /************************************************
  2. * Author: [!output AUTHOR_NAME]
  3. * Date: [!output CURRENT_DATE]
  4. ************************************************/
  5. #include"StdAfx.h"
  6. #include"[!output CLASS_NAME].h"
  7. [!output CLASS_NAME]::[!output CLASS_NAME](void)
  8. {
  9. }
  10. [!output CLASS_NAME]::~[!output CLASS_NAME](void)
  11. {
  12. }

Stdafx.h

  1. /************************************************
  2. * Author: [!output AUTHOR_NAME]
  3. * Date: [!output CURRENT_DATE]
  4. ************************************************/
  5. #pragma once
  6. #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from
  7. // Windows headers
  8. #include<stdio.h>
  9. #include<tchar.h>

Stdafx.cpp

  1. /************************************************
  2. * Author: [!output AUTHOR_NAME]
  3. * Date: [!output CURRENT_DATE]
  4. ************************************************/
  5. #include"stdafx.h"
  6. // TODO: reference any additional headers you need in STDAFX.H
  7. // and not in this file

Readme.txt

  1. ==================================================================
  2. CONSOLE APPLICATION :[!output PROJECT_NAME]ProjectOverview
  3. ==================================================================

Then, you will modify the content of the Templates.inf file to list all of them:

  1. BaseSample.cpp
  2. sampleclass.cpp
  3. sampleclass.h
  4. stdafx.cpp
  5. stdafx.h
  6. ReadMe.txt

You can see several tags in these files: [!output AUTHOR_NAME][!output CURRENT_DATE], and [!output CLASS_NAME]. Visual Studio will replace these tags with the value of the symbols AUTHOR_NAME, CURRENT_DATE, and CLASS_NAME. So, if the name of the author is Marius Bancila, the date is 2006.10.17, and the class name Foo, then the sampleclass.h file would be generated like this:

  1. /************************************************
  2. * Author: Marius Bancila
  3. * Date: 2006.10.17
  4. ************************************************/
  5. #pragma once
  6. classFoo
  7. {
  8. public:
  9. Foo(void);
  10. ~Foo(void);
  11. };

The complete list of template directives is provided in MSDN.

Writing the JScript

When the user clicks the Finish button, the wizard loads the default.js file into the Script Files folder in Solution Explorer. The file contains by default the following functions:

  • OnFinish: Called by the wizard when the Finish button is clicked; it adds files and filters, render templates and creates the configurations
  • CreateCustomProject: Creates the project at the specified location when the Finish button is pressed
  • AddFilters: Adds filters to the project
  • AddConfig: Adds configurations to the project
  • PchSettings: Sets the precompiled header settings
  • DelFile: Deletes the specified files
  • CreateCustomInfFile: Creates the project's Templates.inf file
  • GetTargetName: Gets the name of a specified file
  • AddFilesToCustomProj: Adds specified files to the project

In addition to these functions, you can add your own JScript function to Default.js. To access properties and methods in the wizard object model or the environment model from the JScript file, prepend the object model item with wizard and respective date.

OnFinish

This function is called when the Finish button in the dialog is pressed. This function calls most of the other functions mentioned above. In addition to the default provided code, you need to do three things:

  • Generate a symbol with the value of the current date to write in the files header
  • Add a symbol for each filter to add to the project
  • Call AddCommonConfig function to add the default Debug and Release configurations to the project

The code of the function is shown below:

  1. functionOnFinish(selProj, selObj)
  2. {
  3. try
  4. {
  5. var strProjectPath = wizard.FindSymbol('PROJECT_PATH');
  6. var strProjectName = wizard.FindSymbol('PROJECT_NAME');
  7. // get the current date and add a symbol CURRENT_DATE
  8. var currentTime =newDate();
  9. var month = currentTime.getMonth()+1
  10. var day = currentTime.getDate();
  11. var year = currentTime.getFullYear();
  12. var today = year +'.'+ month +'.'+ day;
  13. wizard.AddSymbol('CURRENT_DATE', today);
  14. // add symbols for the filters of the project
  15. wizard.AddSymbol('MY_SOURCE_FOLDER_NAME','Source Files');
  16. wizard.AddSymbol('MY_HEADER_FOLDER_NAME','Header Files');
  17. wizard.AddSymbol('MY_RESOURCE_FOLDER_NAME','Resource Files');
  18. selProj =CreateCustomProject(strProjectName, strProjectPath);
  19. AddCommonConfig(selProj, strProjectName);
  20. AddConfig(selProj, strProjectName);
  21. AddFilters(selProj);
  22. varInfFile=CreateCustomInfFile();
  23. AddFilesToCustomProj(selProj, strProjectName, strProjectPath,
  24. InfFile);
  25. PchSettings(selProj);
  26. InfFile.Delete();
  27. selProj.Object.Save();
  28. }
  29. catch(e)
  30. {
  31. if(e.description.length !=0)
  32. SetErrorInfo(e);
  33. return e.number
  34. }
  35. }

AddFilters

This function is called to create the filters for the project. Your project will have three filters:

  • Source Files: Contains files with the extensions .cpp, .cxx, .c
  • Header Files: Contains files with the extensions .h, .hpp
  • Resource Files: Contains files with the extensions .rc, .rc2, .bmp, .ico, .gif

In this function, you will retrieve the values of the symbols generated in OnFinish() to use as the filter names.

  1. functionAddFilters(proj)
  2. {
  3. try
  4. {
  5. var group1 = proj.Object.AddFilter
  6. (wizard.FindSymbol('MY_SOURCE_FOLDER_NAME'));
  7. group1.Filter=".cpp;.cxx;.c";
  8. var group2 = proj.Object.AddFilter
  9. (wizard.FindSymbol('MY_HEADER_FOLDER_NAME'));
  10. group2.Filter=".h;.hpp";
  11. var group3 = proj.Object.AddFilter
  12. (wizard.FindSymbol('MY_RESOURCE_FOLDER_NAME'));
  13. group3.Filter='.rc;.rc2;.ico;.gif;.bmp;';
  14. }
  15. catch(e)
  16. {
  17. throw e;
  18. }
  19. }

AddConfig

Use this function to set the various compiler and linker settings for the available configurations. You can access the configuration object in this manner:

  1. var config = proj.Object.Configurations('Debug');

The members of the VCConfiguration interface are listed here. You can set properties such as the IntermediateDirectory, OutputDirectory, or ConfigurationType. An important property is Tools that gives the available tools for the configuration that include:

In the sample code, the compiler, linker, manifest, and browser tools are customized with different settings. The code is listed below:

  1. functionAddConfig(proj, strProjectName)
  2. {
  3. try
  4. {
  5. // ----------------------------------------------------------
  6. // settings for the DEBUG configuration
  7. // ----------------------------------------------------------
  8. var config = proj.Object.Configurations('Debug');
  9. config.IntermediateDirectory='.\\Debug';
  10. config.OutputDirectory='.\\Debug';
  11. config.InheritedPropertySheets=
  12. '$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops';
  13. config.ConfigurationType=ConfigurationTypes.typeApplication;
  14. varCLTool= config.Tools('VCCLCompilerTool');
  15. CLTool.AdditionalIncludeDirectories='./;./src/';
  16. CLTool.Detect64BitPortabilityProblems=false;
  17. CLTool.PreprocessorDefinitions='WIN32;_DEBUG;_CONSOLE';
  18. CLTool.UsePrecompiledHeader= pchOption.pchCreateUsingSpecific;
  19. CLTool.PrecompiledHeaderThrough="StdAfx.h";
  20. CLTool.PrecompiledHeaderFile='.\\Debug/'+
  21. strProjectName +'.pch';
  22. CLTool.AssemblerListingLocation='.\\Debug/';
  23. CLTool.ObjectFile='.\\Debug/';
  24. CLTool.ProgramDataBaseFileName='.\\Debug/';
  25. varLinkTool= config.Tools('VCLinkerTool');
  26. LinkTool.OutputFile='$(OutDir)\$(ProjectName).exe';
  27. LinkTool.GenerateManifest=false;
  28. LinkTool.ProgramDatabaseFile='.\\Debug/'+
  29. strProjectName +'D.pdb';
  30. LinkTool.SubSystem= subSystemOption.subSystemNotSet;
  31. LinkTool.ImportLibrary='.\\Debug/'+ strProjectName +'D.lib';
  32. varManifestTool= config.Tools('VCManifestTool');
  33. ManifestTool.EmbedManifest=false;
  34. ManifestTool.OutputManifestFile='$(TargetPath).manifest';
  35. varBrowseTool= config.Tools('VCBscMakeTool');
  36. BrowseTool.OutputFile='.\\Debug/'+ strProjectName +'D.bsc';
  37. // ----------------------------------------------------------
  38. // settings for the RELEASE configuration
  39. // ----------------------------------------------------------
  40. config = proj.Object.Configurations('Release');
  41. config.IntermediateDirectory='.\\Release';
  42. config.OutputDirectory='.\\Release';
  43. config.InheritedPropertySheets=
  44. '$(VCInstallDir)VCProjectDefaults\\UpgradeFromVC60.vsprops';
  45. config.ConfigurationType=ConfigurationTypes.typeApplication;
  46. varCLTool= config.Tools('VCCLCompilerTool');
  47. CLTool.AdditionalIncludeDirectories='./;./src/';
  48. CLTool.DebugInformationFormat= debugOption.debugDisabled;
  49. CLTool.Detect64BitPortabilityProblems=false;
  50. CLTool.InlineFunctionExpansion= expandOnlyInline;
  51. CLTool.WholeProgramOptimization=false;
  52. CLTool.PreprocessorDefinitions='WIN32;NDEBUG;_CONSOLE';
  53. CLTool.StringPooling=true;
  54. CLTool.EnableFunctionLevelLinking=true;
  55. CLTool.UsePrecompiledHeader= pchOption.pchCreateUsingSpecific;
  56. CLTool.PrecompiledHeaderThrough="StdAfx.h";
  57. CLTool.PrecompiledHeaderFile='.\\Release/'+
  58. strProjectName +'.pch';
  59. CLTool.AssemblerListingLocation='.\\Release/';
  60. CLTool.ObjectFile='.\\Release/';
  61. CLTool.ProgramDataBaseFileName='.\\Release/';
  62. varLinkTool= config.Tools('VCLinkerTool');
  63. LinkTool.OutputFile='$(OutDir)\$(ProjectName).exe';
  64. LinkTool.GenerateManifest=false;
  65. LinkTool.GenerateDebugInformation=false;
  66. LinkTool.ProgramDatabaseFile='.\\Release/'+
  67. strProjectName +'.pdb';
  68. LinkTool.SubSystem= subSystemOption.subSystemNotSet;
  69. LinkTool.OptimizeReferences=
  70. optRefType.optReferencesDefault;
  71. LinkTool.EnableCOMDATFolding=
  72. optFoldingType.optFoldingDefault;
  73. LinkTool.LinkTimeCodeGeneration=
  74. LinkTimeCodeGenerationOption.
  75. LinkTimeCodeGenerationOptionDefault;
  76. varManifestTool= config.Tools('VCManifestTool');
  77. ManifestTool.EmbedManifest=false;
  78. ManifestTool.OutputManifestFile='$(TargetPath).manifest';
  79. varBrowseTool= config.Tools('VCBscMakeTool');
  80. BrowseTool.OutputFile='.\\Release/'+
  81. strProjectName +'D.bsc';
  82. }
  83. catch(e)
  84. {
  85. throw e;
  86. }
  87. }

GetTargetName

This function gets called for every file listed in the Templates.inf file. You can use this method to change the name of the files or the path. That is exactly what we need to do to follow the requirements:

  • Sampleclass.h must be renamed to <CLASS_NAME>.h and put in the src subfolder
  • Sampleclass.cpp must be renamed to <CLASS_NAME>.h and put in the src subfolder
  • BaseSample.cpp must be renamed to main.cpp

All the other file names remain unchanged and they will be placed in the directly under the project folder.

  1. functionGetTargetName(strName, strProjectName)
  2. {
  3. try
  4. {
  5. var strTarget = strName;
  6. // get the name of the class
  7. var strClassName = wizard.FindSymbol('CLASS_NAME');
  8. if(strName =='sampleclass.h')
  9. {
  10. strTarget ='src\\'+ strClassName +'.h';
  11. }
  12. elseif(strName =='sampleclass.cpp')
  13. {
  14. strTarget ='src\\'+ strClassName +'.cpp';
  15. }
  16. elseif(strName =='BaseSample.cpp')
  17. strTarget ='main.cpp';
  18. return strTarget;
  19. }
  20. catch(e)
  21. {
  22. throw e;
  23. }
  24. }

AddFilesToCustomProj

This function parses the templates file and adds files to the project. For each file name, it calls GetTargetName() to get the name (and relative path) of the file in the project. In the templates, one of the files is ReadMe.txt, but you don't want this file to be added to the project file, only to be degenerated in the project folder. A custom function called KeepOutsideProject() takes the name of each file (the same name passed to GetTargetName, and not the name returned by this function) and returns true if the file should not be listed in the project file.

  1. functionKeepOutsideProject(strName)
  2. {
  3. try
  4. {
  5. var add =false;
  6. if(strName =='ReadMe.txt')
  7. add =true;
  8. return add;
  9. }
  10. catch(e)
  11. {
  12. throw e;
  13. }
  14. }

Once a file is generated in the project folder, it is added to the project to one of the available filters, depending of the extension. Complete source code is listed below:

  1. functionAddFilesToCustomProj(proj, strProjectName, strProjectPath,
  2. InfFile)
  3. {
  4. try
  5. {
  6. var projItems = proj.ProjectItems
  7. // get references to the filters of the project
  8. var projFilters = proj.Object.Filters;
  9. var filterSrc =
  10. projFilters.Item(wizard.FindSymbol('MY_SOURCE_FOLDER_NAME'));
  11. var filterHdr =
  12. projFilters.Item(wizard.FindSymbol('MY_HEADER_FOLDER_NAME'));
  13. var filterRc =
  14. projFilters.Item(wizard.FindSymbol('MY_RESOURCE_FOLDER_NAME'));
  15. var strTemplatePath = wizard.FindSymbol('TEMPLATES_PATH');
  16. var strTpl ='';
  17. var strName ='';
  18. var strTextStream =InfFile.OpenAsTextStream(1,-2);
  19. while(!strTextStream.AtEndOfStream)
  20. {
  21. strTpl = strTextStream.ReadLine();
  22. if(strTpl !='')
  23. {
  24. strName = strTpl;
  25. var strTarget =GetTargetName(strName, strProjectName);
  26. var strTemplate = strTemplatePath +'\\'+ strTpl;
  27. var strFile = strProjectPath +'\\'+ strTarget;
  28. var bCopyOnly =false;
  29. var strExt = strName.substr(strName.lastIndexOf("."));
  30. if(strExt==".bmp"|| strExt==".ico"|| strExt==".gif"||
  31. strExt==".rtf"|| strExt==".css")
  32. bCopyOnly =true;
  33. wizard.RenderTemplate(strTemplate, strFile, bCopyOnly);
  34. if(!KeepOutsideProject(strName))
  35. {
  36. if(strExt =='.cpp'|| strExt =='.cxx'||
  37. strExt =='.c')
  38. {
  39. filterSrc.AddFile(strTarget);
  40. }
  41. elseif(strExt =='.hpp'|| strExt =='.h')
  42. {
  43. filterHdr.AddFile(strTarget);
  44. }
  45. elseif(strExt =='.rc2'||
  46. strExt =='.ico'|| strExt =='.gif'||
  47. strExt =='.bmp')
  48. {
  49. filterRc.AddFile(strTarget);
  50. }
  51. elseif(strExt =='.rc')
  52. {
  53. filterRc.AddFile(strFile);
  54. }
  55. else
  56. proj.Object.AddFile(strFile);
  57. }
  58. }
  59. }
  60. strTextStream.Close();
  61. }
  62. catch(e)
  63. {
  64. throw e;
  65. }
  66. }

All the other functions in Default.js should remain unmodified for this sample project.

Deploying the VC++ Wizard

If you followed all the indications I have given in this article so far, the DummyWin32Wizard is completed. Because Visual Studio has copied the necessary entry files in its default folder for wizards, you now can create projects using it, wherever the project is located on your computer. However, I suggest you deploy it in the same location with the other VisualC++ templates. There are two folders:

  • {VS2005InstallationFolder}\VC\VCWizards: Hosts the wizard projects; you should deploy the wizard project in the AppWiz subfolder, either by simply copying the project here, or using an installation project (if you want to deploy it on more machines, not just yours);
  • {VS2005InstallationFolder}\VC\VCProjects: You have to deploy three files here (remember that on your machine you should already have these files in place):
    • DummyWin32Wizard.ico
    • DummyWin32Wizard.vsdir
    • DummyWin32Wizard.vsz

If you deploy the files here, you should change the path parameter in the DummyWin32Wizard.vsz file. The content of the file should change from:

  1. VSWIZARD 7.0
  2. Wizard=VsWizard.VsWizardEngine.8.0
  3. Param="WIZARD_NAME = DummyWin32Wizard"
  4. Param="ABSOLUTE_PATH =
  5. D:\Cilu\VC++\codeguru\articles\wizard\DummyWin32Wizard"
  6. Param="FALLBACK_LCID = 1033"
  1. VSWIZARD 7.0
  2. Wizard=VsWizard.VsWizardEngine.8.0
  3. Param="WIZARD_NAME = DummyWin32Wizard"
  4. Param="RELATIVE_PATH = VCWizards\AppWiz"
  5. Param="FALLBACK_LCID = 1033"

Using DummyWin32Wizard

Having done that, your VC++ wizard is set in place and you can use it just like all the others wizards: go to File > New > Project, select the VisualC++ category, and then Dummy Win32 Wizard item in the templates list. When you select it, the wizard's settings page is shown:

[wizardpage.png]

If you generate a project called DummyTest and fill in Foo for the name class, and an author name, the generated files for the project are shown below:

[solution2.png]

Create a Visual C++ Wizard for Visual Studio 2005的更多相关文章

  1. Cocos2d-x Application Wizard for Visual Studio User Guide

    0. Overview Cocos2d-x-win32's project can be generated by Wizard. Wizard supports Visual Studio 2008 ...

  2. Quickstart: Create and publish a package using Visual Studio (.NET Framework, Windows)

    https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-visual-studio-n ...

  3. How to automate Microsoft Word to create a new document by using Visual C#

    How to automate Microsoft Word to create a new document by using Visual C# For a Microsoft Visual Ba ...

  4. Using Nuget in Visual Studio 2005 & 2008

    NuGet is a Visual Studio extension that makes it easy to install and update third-party libraries an ...

  5. Visual Studio 2005 搭建Windows CE 6.0环境之准备

    Microsoft Visual Studio 2005 Visual Studio 2005 Professional 官方90天试用版英文版:http://download.microsoft.c ...

  6. 解决Visual C++ Redistributable for Visual Studio 2015的安装问题

    1. Visual C++ Redistributable for Visual Studio 2015系统要求:Windows 7情况下必须是Windows 7 with SP1.或者Windows ...

  7. Visual Studio 2005安装qt-win-commercial-src-4.3.1,并设置环境变量

    虽然已经在Visual Studio 2005下安装Qt4已经n次了,还是打算在上写写安装方法. qt-win-commercial-src-4.3.1.zip.qt-vs-integration-1 ...

  8. Visual Studio 2005 移植 - WINVER,warning C4996, error LINK1104

    Visual Studio 2005 移植 - WINVER,warning C4996, error LINK1104 一.WINVER  Compile result:  WINVER not d ...

  9. visual studio 2005提示脚本错误 /VC/VCWizards/2052/Common.js

    今天在做OCX添加接口的时候,莫名其妙的遇到visual studio 2005提示脚本错误,/VC/VCWizards/2052/Common.js. 网上找了很多资料,多数介绍修改注册表“vs20 ...

随机推荐

  1. JS函数种类详解

    1. 普通函数1.1 示例 1 2 3 function ShowName(name) {   alert(name); } 1.2 Js中同名函数的覆盖 在Js中函数是没有重载,定义相同函数名.不同 ...

  2. Python笔记(九)

    #encoding=utf-8 # python高级编程 # python面向对象 # 创建类 # 无意中把Visual Studio Code的窗口调小了,查了一下,可以使用Ctrl+=放大窗口,使 ...

  3. guice基本使用,常用的绑定方式(四)

    guice在moudle中提供了良好的绑定方法. 它提供了普通的绑定,自定义注解绑定,按名称绑定等. 下面直接看代码: package com.ming.user.test; import com.g ...

  4. 第7章 性能和可靠性模式 Load-Balanced Cluster(负载平衡群集)

    上下文 您已经决定在设计或修改基础结构层时使用群集,以便在能够适应不断变化的要求的同时保持良好的性能. 问题 在保持可接受的性能级别的同时,如何设计一个可适应负载变化的.可伸缩的基础结构层? 影响因素 ...

  5. js 找数组中的最值

    背景: 2个数组以下 , 比如  [[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]] 找最值的时候, ...

  6. lambda表达式、匿名函数

    lambda表达式是函数式编程中的匿名函数语法规范. In computer programming, an anonymous function (function literal, lambda ...

  7. [SOA]REST与SOA两种架构的异同比较

    REST的特性 它基于HTTP协议,是一种明确构建在客户端/服务端体系结构上的一种风格.特征如下: 1.网络上的资源都被抽象为资源,这些资源都具有唯一的统一资源标识符(URI:Uniform Reso ...

  8. C# 把对象序列化 JSON 字符串 和把JSON字符串还原为对象

    /// <summary> /// 把对象序列化 JSON 字符串 /// </summary> /// <typeparam name="T"> ...

  9. UWP 利用DataGrid控件创建表格

    通过 Nuget 搜索 Microsoft.Toolkit.Uwp.UI.Controls.DataGrid 安装库,在XAML文件中添加引用库 xmlns:controls="using: ...

  10. javaee 文件的读取

    package Shurushucu; import java.io.FileNotFoundException; import java.io.FileOutputStream; import ja ...