1 / 26

Visual C++ 2008 Overview & New Features

Visual C++ 2008 Overview & New Features. Boris Jabes Program Manager Visual C++ Microsoft Corporation. The themes of Visual C++ 2008. Vista Development Productivity Interoperability. Vista Development. So, what's new (for you) in Vista?. Aero Aesthetics Common Controls Task Dialogs

jola
Download Presentation

Visual C++ 2008 Overview & New Features

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual C++ 2008Overview & New Features Boris Jabes Program Manager Visual C++ Microsoft Corporation

  2. The themes of Visual C++ 2008 • Vista Development • Productivity • Interoperability

  3. Vista Development

  4. So, what's new (for you) in Vista? • Aero Aesthetics • Common Controls • Task Dialogs • Search • Wizards • Common Dialogs • Control Panels • Icons • System Font (Segoe UI) • User Account Control • Notifications • Text and Tone • Restart Manager • Function Discovery • Cancellable I/O • Error Reporting API • RSS Feeds • Network Awareness • Low-Rights IE • ASLR

  5. Updates to MFC • Hide/Unhide the Menu Bar • New File Dialogs • Support for the new Common Controls

  6. Toggling the Menu Bar • New methods in CFrameWnd class to hide or show menu in an MFC Application • Methods to dynamically toggle menu to become hidden or visible • Event handlers for custom actions when menu is about to be hidden or visible. • No support to toggle the menu bar in MDI and dialog-based applications virtual void CFrameWnd::SetMenuBarVisibility(DWORD nStyle); virtual DWORD CFrameWnd::GetMenuBarVisibility();

  7. MFC Common File Dialogs • By default, MFC applications compiled under VC2008 will utilize Vista-style dialogs on Vista • New Methods Called • The new MFC Common File Dialog uses IFileDialogEvents instead of OnNotify • If the user runs the program in a pre-Vista OS, then the dialogs default to the old-style dialogs

  8. MFC Controls • Fell behind since Win9x. Now up-to-date • New Control Messages • New WM Messages • New Controls like Pager Control • Includes new Vista controls

  9. New Common Controls in Vista

  10. demo

  11. User Account Control • Available out of the box • Linker Switch • /MANIFESTUAC • Project Setting > Linker > Manifest File • Project Upgrade • UAC is turned on, level is set to “asInvoker”

  12. Developer != Admin • Register COM components as normal user • Put them into HKCU when developing • Maintain existing deployment • Support for debugging IE7 Protected Mode • Debugger to Launch > Web Browser Debugger

  13. Security Bulletin • Let’s review • /GS • /SafeSEH • DEP • New in Vista: ASLR • Linker switch (/DYNAMICBASE) to opt in to support ASLR • http://msdn2.microsoft.com/en-us/library/bb430720.aspx

  14. Productivity

  15. IDE Support for Icons • Support for viewing PNG and Vista compressed icons • Icon Editor Preview Area 256 px

  16. Build in Parallel • In 2005 • Build Multiple Project in Parallel • Tools > Options > Project and Solutions > Build and Run > Parallel Project Builds • In 2008 • Build Multiple Translation Units in Parallel • /MP or /MPn (where n is no. of CPUs) • Project Properties > C/C++ > Command Line > Additional Options

  17. Managed Incremental Build A.dll A.Dll … ClassB b; b.f() … B.meta B.dll B.meta(*) B.Dll public ref class ClassB { public String f() { //important string here return “Important String”; } } Skip projects with no “significant” changes since last build

  18. Interop

  19. Marshaling • New library to simplify passing data between native and managed code • Template-based pattern that applies to any kind of data • Support lots of types out-of-the-box

  20. Stateless Transition • I want to marshal between managed and native data types for conversions that do not require any lifetime management or complex resource allocation #include <msclr/marshal.h> using namespace msclr::interop; … { … const char* sourcestring1 = “teststring” System::String^ deststring1; // Convert const char* to System::String^ using // TO to = marshal_as <TO> (from) deststring1 = marshal_as<System::String^>(sourcestring1); … }

  21. Stateful Transition • I want to marshal between managed and native data types for conversions that require some kind of lifetime (memory, resource, etc…) #include <msclr/marshal.h> using namespace msclr::interop; … { … System::String^ sourcestring1 = “teststring” const char* deststring1; //Convert System::String^ to const char* using //TO to = context.marshal_as<TO>(from) marshal_contextctx; deststring1 = ctx.marshal_as<const char*>(sourcestring1); … }

  22. STL/CLR • Leverage STL skills in applications that use .NET Framework • Ease data exchange between STL and .NET Collections • The power of templates and generics together • Designed to achieve optimal performance and cross-language compatibility • STL in any part of managed code (but only C++)

  23. Bonus Feature

  24. Class Designer • Only does visualization of code

  25. Q & A • Me – http://blogs.msdn.com/borisj • VC++ - http://blogs.msdn.com/vcblog

More Related