Datasheet

718
Creating a New Win32 Console Application
5. Select a location for the project and click OK.
The Location field of the New Project dialog box contains the location
you selected.
6. Click OK.
Visual Studio starts the Win32 Application Wizard. You see the Welcome
page of this wizard.
7. Click Next.
You see the Application Settings page shown in Figure 1-2. The Win32
Console Application template actually provides access to four kinds of
applications, including a DLL or static library. You can also add support
for both the MFC and Active Template Library (ATL). The default set-
tings work fine for the example, but it’s important to know that other
options exist.
Figure 1-2:
The
Application
Settings
page
lets you
choose an
application
type.
8. Click Finish.
The wizard creates a new solution and project that contains four files.
Normally, you won’t care about stdafx.cpp, which contains a list of
standard headers for your project. You’ll add any headers you need for
your project to the stdafx.h file. The targetver.h file contains special
code that tells the compiler which version of Windows to target for the
application (you can find the acceptable values for the Windows versions
at http://msdn.microsoft.com/en-us/library/6sehtctf.aspx).
The final file, Hello World.cpp, contains the application source code.
44_317358-bk07ch01.indd 71844_317358-bk07ch01.indd 718 7/22/09 11:44:50 PM7/22/09 11:44:50 PM