Windows 7 Applications with WPF, C# and MFC/C++

Since managed code made its appearance about a decade ago, I’ve not touched MFC or C++. For business applications or just for applications that look great, writing code in MFC/C++ seemed to be doing things the hard way. A few weeks ago at a TechDays event, I got the chance to see that the unmanaged code world hasn’t been standing still either.

We’ve had Windows Presentation Foundation and Silverlight for a few iterations now. Windows 7 comes with even more of these APIs as standard, which you can use to give your applications the distinctive Windows 7 look and feel.

Whilst managed languages in .NET have had excellent support for developing shiny applications for a while (Paint.NET is a great example of this, go ahead and download the Paint.NET source code!), unmanaged C++ and MFC has lagged behind in the tools department for too long.

Visual Studio 2010 changes this.

If you’re a C#, WPF or Silverlight developer, then you’ll be anxiously awaiting the WPF 4.0 Windows 7 and Office Ribbon Control, which is not yet released. Scott Guthrie as a long-standing article on the out-of-band WPF 4.0 controls package.

At a Microsoft TechDays UK event at Reading last month, Jason Zander the Visual Studio 2010 general manager, went through many of the new features in the platform.

In the video below, Jason walks through the steps to upgrade an old MFC application, with a distinctly 1990’s feel, to use the up-to-date look and feel of Windows 7.

There’s a lot of copy and paste of MFC and C++ code in this video. Looking at all the steps MFC and C++ guys have to go through, I’m quite happy my C++ days are over. Even though there’s a lot more help for C++ in the IDE these days, it’s still seems a very pedestrian way of cutting code. At least you’ve got Ctrl-Comma to launch Intellisense in the IDE.

MFC Class Wizard

One feature missing that was removed in the 2008 release of Visual Studio was the MFC class wizard, so you can’t say they don’t listen!

Jason also shows how you can access some of the animation subsytem in unmanaged code. This is so much easier in WPF and C#.

The nice people at VivaMind have build this splendid WPF sample to show the tree of WPF documentation samples available on MSDN.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>