from:
http://www.microsoft.com/express/2005/platformsdk/default.aspx
By Brian Johnson,
Microsoft Corporation
You can use Visual C++ Express to build powerful .NET Framework applications immediately after installation. In order to use Visual C++ Express to build Win32 applications, you'll need to take just a few more steps. I'll list the steps necessary for building Win32 applications using Visual C++ Express.
Step 1: Install Visual C++ Express.
If you haven't done so already, install Visual C++ Express.
Step 2: Install the Microsoft Platform SDK.
Install the Platform SDK over the Web from the Download Center. Follow the instructions and install the SDK for the x86 platform.
Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.
Add the paths to the appropriate subsection:
* Executable files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin
* Include files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include
* Library files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Lib
Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the /vc/vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%/Local Settings/Application Data/Microsoft/VCExpress/8.0" if it exists before restarting Visual C++ Express Edition.
Step 4: Update the corewin_express.vsprops file.
One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:/Program Files/Microsoft Visual Studio 8/VC/VCProjectDefaults) and
Change the string that reads:
AdditionalDependencies="kernel32.lib"
to
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
Step 5: Generate and build a Win32 application to test your paths.
In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder %ProgramFiles%/Microsoft Visual Studio 8/VC/VCWizards/AppWiz/Generic/Application/html/1033/".
In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:
// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;
Save and close the file and open Visual C++ Express.
From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.
As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.
參考譯文:
安裝之後,您可以立即使用Visual C++ 2005速成版來生成功能強大的.NET Framework 應用程式。若要使用 Visual C++ 速成版生成Win32應用程式,隻需采取幾個步驟,下面對此進行了詳細介紹。
1. 安裝 Platform SDK 以便與 Visual C++ 速成版結合使用從 Platform SDK 更新站點 的 Platform SDK Update 站點通過 Web 安裝 Microsoft Platform SDK。在該頁上,單擊“Download”(下載下傳),然後確定從清單中依次選擇“Windows SDK”和“Core SDK”。
2. 從 Visual Studio 中的“工具”菜單上,選擇“選項”。出現“選項”對話框。
從“選項”對話框中,展開“項目和解決方案”節點并選擇“VC++ 目錄”。在該部分,将以下路徑添加到相應的子節:
可執行檔案:C:/Program Files/Microsoft SDK/Bin
包含檔案:C:/Program Files/Microsoft SDK/include
庫檔案:C:/Program Files/Microsoft SDK/lib
注意 在您的系統上,Platform SDK 的位置可能有所不同。
3. 更新 corewin_express.vsprops 檔案
(位于C:/Program Files/Microsoft Visual Studio 8/VC/VCProjectDefaults 中)
并将以下字元串:
AdditionalDependencies="kernel32.lib"
更改為:
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
注意 在您的系統上,Visual C++ 速成版 可能安裝到了不同的位置。
4. 在Visual C++ 速成版,Win32應用程式向導上的Windows 應用程式選項是不可選的,要使用這個選項,你需要修改AppSettings.htm這個檔案,它位于"%ProgramFiles%/ Microsoft Visual Studio 8/VC/VCWizards/AppWiz/Generic/Application/html/1033/".
在文本編輯器用"// "符号把檔案裡的441 - 444這幾行注釋掉,像下面這樣:
// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;
儲存和關閉檔案,然後打開Visual C++ 速成版.