Beginning Visual CPP 2005 Express Part 1 - Online Article

Introduction

Microsoft Visual C++ 2005 Express Edition has been significantly improved for Visual C++ developers by adding innovative language constructs, new compiler features, dramatically enhanced productivity, and an improved debugging experience. Microsoft Visual C++ 2005 Express Edition includes several productivity enhancements including IntelliSense code snippets, Windows Forms designer updates, IntelliSense filtering, debugger data tips, Exception Assistant, and more. In language innovations, Microsoft Visual C++ 2005 Express Edition includes generics, unsigned types, operator overloading, and many other additions.

I hope that you have successfully installed Visual C++ 2005 Express Edition. It is free of cost and is available for download from http://www.microsoft.com/

Getting Started

Step 1: Click to start -> All Programs-> Visual C++ 2005 Express Edition-> Microsoft Visual C++ 2005 Express Edition.

Image1

Step 2: Following Window Appears. Click on Win32 under VC++ and Win32 project on right pane if required.

Image2

Step 3: For making a new application, go to File->New->Project.

Image3

Step 4: Following Screen Appears with a Windows form.

Image4

Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK

Microsoft® Visual C++® contains a snapshot of the Microsoft Platform SDK content at the time that Visual C++ was released. Over time, the Platform SDK content included with Visual C++ will become out of date, because the Platform SDK can be updated on a different schedule than Visual C++. You can install the latest Platform SDK for use with any supported version of Visual C++.

Step 1: Install Visual C++ Express. We have already completed this step.

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:

  1. Executable files: C:\Program Files\Microsoft Platform SDK\Bin
  2. Include files: C:\Program Files\Microsoft Platform SDK\include
  3. Library files: C:\Program Files\Microsoft Platform SDK\lib

Setting the VC++ Directories for Complier

Step 1

Ensure that the SDK bin directory is listed before the Visual C++ bin directory. For command-line builds, check the PATH environment variable using the set command. For builds within Visual Studio, you must update the directory settings.

1. Go to the Tools menu and click Options. From the Directories tab, select VC++ Directories from Projects and Solutions.

Image5

2. Click on New folder and define the path for bin

$(Program Files)\Microsoft Platform SDK\Bin.

Step 2

Ensure that the SDK lib directory is listed before the Visual C++ bin directory. For command-line builds, check the PATH environment variable using the set command. For builds within Visual Studio, you must update the directory settings.

1. Go to the Tools menu and click Options. From the Directories tab, select VC++ Directories from Projects and Solutions.

Image6

2. Click on New folder and define the path for lib

$(Program Files)\Microsoft Platform SDK\lib.

Step 3

Ensure that the SDK include directory is listed before the Visual C++ bin directory. For command-line builds, check the PATH environment variable using the set command. For builds within Visual Studio, you must update the directory settings.

1. Go to the Tools menu and click Options. From the Directories tab, select VC++ Directories from Projects and Solutions.

Image7

2. Click on New folder and define the path for include

$(Program Files)\Microsoft Platform SDK\include.

3. Click on OK.

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)

Image8

Change the string that reads:

AdditionalDependencies="kernel32.lib" to

Image9

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Image10

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\".

Image11

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.

About the Author:

No further information.




Comments

No comment yet. Be the first to post a comment.