Вы находитесь на странице: 1из 21

Visual C++: What's

next?

Steve Teixeira
Group Program Manager
Microsoft Corporation
Q: What do these have in
common? D!
E A
T D
N O
RE
Y
H E
: T
A
The Visual C++ Mission

Enable developer success on


Microsoft platforms by providing
world-class native tools while
bridging to next-generation
technologies
The Visual C++ customer
Writes code that must compile cross-
platform
Has a substantial existing investment
in C++ they wish to maintain
Builds software that requires a
greater degree of runtime control
than the CLR offers today
Roadmap: Three pillars of
product focus
Add value to Microsoft native platform
technologies
Renewed investment in native libraries, such as MFC
Ability to interoperate between platform paradigms
Support for platform innovations in areas such as
concurrency
Native/managed bridge
C++/CLI language & IJW interop
Libraries-based bridge technology
Developer agility & productivity
IDE tooling that gracefully scales to XXL projects
Compiler front-end that supports IDE tooling and provides
Orcas: First stop on the
roadmap
Support for the latest Microsoft platform technology
New MFC goodies for Vista UI
UAC support in IDE and projects
New Vista SDK with thousands of native APIs
Native/managed bridge
STL/CLR
Marshaling library
Developer agility & productivity
Compiler throughput: Metadata-based incremental
managed builds and concurrently module compilation
.NET Framework multi-targeting
Welcome back, class designer!
VC++ Orcas: New
Common Controls
MFC encapsulations and related dialog editor
support for new Windows Vista Common Controls
SysLink
Network address control
Command Link
Split button
While were at it, were adding the Windows XP-
level support that we never managed to get to
previously
Hundreds of messages, styles, notifications, etc.
Were even updating Spy++!
Conforming with style
guidelines
Weve tried to make MFC do the
heavy lifting where its able so that
you get the Vista/Aero look for free
where possible and to also look great
down-level to Windows 2000
Vista file dialogs
Vista look and feel (metrics, fonts, and
voice)
Vista-enabling UI (menus, toolbars,
New Vista Common
Controls
VC++ Orcas Build Throughput

Metadata-based incremental builds for managed


modules
Prevents full stack rebuilds for minor changes
Potential to greatly increase build throughput for
Solutions with managed project dependencies
New compiler switch to support multiple
simultaneous module compilation
Currently, projects can be built in parallel, but
modules are serialized
Weve learned that project dependency trees
can kill project-based parallelism
Class designer
Visualize native C++ code
Fully integrated into the IDE
Tight code synchronization
C++ language concepts are first-class
citizens
e.g., templates, typedefs, enums, etc.
Displays language specific terminology
Use the C++ class designer to:
Understand existing code
C++ Class Designer
STL/CLR
Implementation of the Standard
Template Library on the .NET
Framework
Enables leveraging STL skills in
applications that use .NET
Framework
Easy interop between native code in
STL and managed code with .NET
collections
Leverages templates and generics
STL/CLR Details
Provides a set of containers, iterators
and algorithms similar to STL
Introduces generic-based containers
and iterators to operate on STL/CLR
data across .NET assemblies
Ease data exchange between STL
and .NET Collections
Can be used in Mixed, Pure and Safe
modes
Using STL/CLR
Pop Quiz!
How many standard string types
does a C++ developer use on a
regular basis?
1. single byte char array
2. single by char pointer
3. multi-byte char array
4. multi-byte char pointer
5. double-byte char array
6. double-byte char pointer
7. BSTR
8. CString
9. std::string
Marshaling library
A template-based C++ library for
handling conversion and marshaling
between common native and
managed types
#include <msclr/marshal.h>
Syntax:
using namespace msclr::interop;

ATYPE t = marshal_as<ATYPE>(fromtype);
Marshaling lib and interop
class Data {
gcroot<XmlDocument> xmlDoc;
public:
void Load(std::string fileName) {
XmlTextReader^ reader = gcnew XmlTextReader(
marshal_as<System::String^>(fileName));
xmlDoc = gcnew XmlDocument(reader);
}
};

ref class MyControl : UserControl { // reference type


std::vector<std::string>* words; // use native type
void Add(std::string s) { words->push_back(s); }
public:
void Add(String^ s) { Add(marshal_as<std::string>(s)); }
};
Other Orcasy things you should
know
ATL Server has been liberated as a
shared source project on CodePlex!
/Wp64 switch is being deprecated
/clr:oldSyntax is being deprecated
Pre-Windows 2000 targeting is being
retired from the native libraries
One more thing
2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or
other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to
changing market conditions,
it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

Вам также может понравиться