Porting an application refers to opening it for the first time in
Visual C++. Upgrading refers to opening a project from a previous
version of Visual C++ in the current version.
For more
information, see
What's New in Visual C++ 2008.
In
This Section
How to: Upgrade Projects from Previous Versions of
Visual C++
Discusses how to use projects created in previous
versions of Visual C++.
Introduction to Visual C++ for UNIX Users
Provides information for UNIX users who are new to
Visual C++ and want to become productive with Visual
C++.
Porting from UNIX to Win32
Discusses options for migrating UNIX applications to
Windows.
How to: Upgrade Wizard-Generated Managed Extensions for
C++ Code
Discusses how you can upgrade wizard-generated code.
Managed Extensions for C++ Syntax Upgrade Checklist
Lists the syntactic differences between Managed
Extensions for C++ and the new Visual C++ syntax for
targeting the common language runtime.
C++/CLI Migration Primer
A detailed guide to upgrade your Managed Extensions
for C++ syntax to use the new syntax (see
Language Features in Visual C++ 2005 for more
information on the new syntax).
Note:
An ActiveX control compiled with Visual C++
6.0 when embedded in a dialog box in a project
developed with Visual C++ 2008 may cause your
program to assert at runtime. In this situation,
recompile the ActiveX control using Visual C++
2008. The assert will be in the file occcont.cpp,
on the line in source:
ASSERT(IsWindow(pTemp->m_hWnd)).
How to: Upgrade Projects from Previous Versions of Visual C++
Projects built in Visual C++ since version 4.x
can be opened and saved as projects.
When a project in the format
of a previous version of Visual C++ is opened, a backup copy of the
project file is made. Note that any change to the new project file
will cause the old project file to become obsolete. Also, note that
attempting to rename the old project file so it can be opened will
cause you to lose the changes that were made to the project file
created in the upgrade.
You may want or need to modify the new project:
How to: Modify WINVER and _WIN32_WINNT
Conversion failed Dialog Box
How to: Access ClassWizard and WizardBar Functionality
For additional information, see:
What's New in Visual C++ 2008
Breaking Changes
Nonstandard Behavior
Standard C++ Library Changes
ATL and MFC Version Numbers
Upgrade
Previous Visual C++ Enterprise Edition Projects
Data sources have their own project in Visual C++. You do
not need a C++ project; your project can consist solely of
data sources, and you can edit and debug the stored
procedures within the data sources.
The data sources appear as a separate database project in
Server Explorer. You can switch to Server Explorer by
clicking the Server Explorer tab.
When you open a project built in a previous version of
Visual C++ Enterprise Edition, a database project is
automatically created for the data sources. This project
appears in Solution Explorer, along with the C++ project
that once contained the data sources.
How to: Modify WINVER and _WIN32_WINNT
Beginning with Visual C++ 2008, Visual C++ does not support
targeting Windows 95, Windows 98, Windows ME, or Windows NT. If your
WINVER or _WIN32_WINNT macros are assigned to one of
these versions of Windows, you will need to modify the macros. When
you upgrade a project that was created from a previous version of
Visual C++, you may see compilation errors related to the WINVER
or _WIN32_WINNT macros if they are assigned to a version of
Windows that is no longer supported.
Remarks
To modify the macros, in a header file, add the following
lines:
Copy Code
#define WINVER 0x0500
#define _WIN32_WINNT 0x0500
This will target the Windows 2000 operating system. Other
valid values include 0x0501 for Windows XP, 0x0502 for
Windows Server 2003, and 0x0600 for Windows Vista.
You can also define this macro with the /D
compiler option; see
/D (Preprocessor Definitions) for more information.
For more information on the meanings of these macros, see
Using the Windows Headers.
See
Also
Conversion failed Dialog Box
The project system was not able to open a project from a previous
version of Visual C++. Possible reasons include:
A valid project file was not specified.
The project did not contain a Win32 platform configuration.
In order for a Visual C++ project from a previous version of
Visual C++ to be opened, there needs to be at least one
configuration with a Win32 platform target.
How to: Access ClassWizard and WizardBar Functionality
In previous versions of Visual C++, ClassWizard and
WizardBar helped you develop your MFC application.
ClassWizard and WizardBar were removed in Visual
C++ .NET 2002. This topic discusses where ClassWizard
and WizardBar functionality can be accessed in Visual
C++.
WizardBar
To add a new
class
In Class View
or Solution Explorer,
right-click the project node. On the
shortcut menu, click Add and then
click Add Class.
To add a
function to a class
In Class View,
right-click the class. On the shortcut
menu, click Add and then click
Add Function.
To go to a
definition
Use the Navigation Bar, which is at
the top of the text editor window. You
can turn the Navigation Bar off from the
General tab of the
C/C++ folder,
which is in the Text
Editor folder of the
Options dialog
box (Tools menu).
You can also use the Object Browser.
See
Searching for Symbols: Objects,
Definitions and References for more
information.
ClassWizard
For more information about wizards that add
code to a project, see
Adding Functionality with Code Wizards.
To add a member
variable
In Class View,
right-click the class to which you want
to add a member variable. On the
shortcut menu, click Add and then
click Add Variable.
For more information, see
Adding a Member Variable.
To add a handler
for a message
See
Mapping Messages to Functions.
To add methods
and properties to automation interfaces
In Class View, right-click an
interface that supports automation. On
the shortcut menu, click Add and
then click Add Method or
Add Property.
For more information, see
Adding a Method or
Adding a Property.
To add ActiveX
events
In Class View for an ActiveX control
project, right-click the class to which
you want to add an event. On the
shortcut menu, click Add and then
click Add Event.
For more information, see
Adding an Event.
To add a handler
(function) for a user-interface item
Select the item in Resource View.
For example, select a button. Press F4
to open the Properties
window and click the ControlEvents
button. Select a message in the left
column and click Add from the
right column. The function will appear
in Class View.
For more information, see
Adding an MFC Message Handler.