Monday, 9 July 2012

Developing Metro Apps using C++/CX

For most of the year I’ve been developing a Windows 8 Metro app, in C++/CX, with the Patterns and Practices team. As we near the release of the app I thought it would be useful to provide some background on C++/CX. Earlier in the year I wrote an article for the MSDN Flash UK newsletter, that demonstrates the ease of use of C++/CX for writing Windows 8 Metro applications through a sample application that enumerates the Windows 8 Pictures library, and displays thumbnails for each picture.

WinRT is the framework and library for building Windows 8 Metro applications. It can be used from C++, as well as JavaScript and .NET languages. It’s built on COM, and while working with COM has traditionally been difficult, WinRT has made the process very straight forward.

Developing a Windows 8 Metro application using C++ gives you the advantages of programming in both C++11 and C++/CX. C++11, formerly known as C++0x, is the name of the most recent iteration of the C++ programming language. It includes additions to the core language and also extends the C++ standard library. C++/CX (Component Extensions) is a set of extensions that makes it to easy to consume WinRT functionality from C++. It looks like C++/CLI but its native code, being COM under the covers rather than .NET. In addition, C++/CX hides all the COM, making programming WinRT straight forward.

For more information, see Developing Metro Apps using C++/CX, for C# developers.

No comments: