WRL simplifies using and accessing WinRT objects, but it's still a way to go from the normal C++ experience when creating and using objects. Calling the
new operator is far easier than using
Windows::Foundation::ActivateInstance and working with a
ComPtr<T> smart pointer.
To this end, Microsoft has created a set of extensions to the C++ language, called C++/CX that help to bridge the gap, so that working with WinRT objects is almost as simple as working with non-WinRT objects.
The following sections discuss some of the more common extensions. We'll discuss more extensions throughout the book. First, we'll look at creating objects, then we'll examine various members and how to access them, and finally, we'll consider the basics of creating ...