Introduction to C++/WinRT |
An introduction to C++/WinRT—a standard C++ language projection for Windows Runtime APIs. |
Get started with C++/WinRT |
To get you up to speed with using C++/WinRT, this topic walks through a simple code example. |
What's new in C++/WinRT |
News and changes to C++/WinRT. |
Frequently-asked questions |
Answers to questions that you're likely to have about authoring and consuming Windows Runtime APIs with C++/WinRT. |
Troubleshooting |
The table of troubleshooting symptoms and remedies in this topic may be helpful to you whether you're cutting new code or porting an existing app. |
Photo Editor C++/WinRT sample application |
Photo Editor is a UWP sample application that showcases development with the C++/WinRT language projection. The sample application allows you to retrieve photos from the Pictures library, and then edit the selected image with assorted photo effects. |
String handling |
With C++/WinRT, you can call Windows Runtime APIs using standard C++ wide string types, or you can use the winrt::hstring type. |
Standard C++ data types and C++/WinRT |
With C++/WinRT, you can call Windows Runtime APIs using Standard C++ data types. |
Boxing and unboxing values to IInspectable |
A scalar or array value needs to be wrapped inside a reference class object before being passed to a function that expects IInspectable. That wrapping process is known as boxing the value. |
Consume APIs with C++/WinRT |
This topic shows how to consume C++/WinRT APIs, whether they're implemented by Windows, a third-party component vendor, or by yourself. |
Author APIs with C++/WinRT |
This topic shows how to author C++/WinRT APIs by using the winrt::implements base struct, either directly or indirectly. |
Error handling with C++/WinRT |
This topic discusses strategies for handling errors when programming with C++/WinRT. |
Handle events by using delegates |
This topic shows how to register and revoke event-handling delegates using C++/WinRT. |
Author events |
This topic demonstrates how to author a Windows Runtime component containing a runtime class that raises events. It also demonstrates an app that consumes the component and handles the events. |
Collections with C++/WinRT |
C++/WinRT provides functions and base classes that save you a lot of time and effort when you want to implement and/or pass collections. |
Concurrency and asynchronous operations |
This topic shows the ways in which you can both create and consume Windows Runtime asynchronous objects with C++/WinRT. |
Advanced concurrency and asynchrony |
Advanced scenarios with concurrency and asynchrony in C++/WinRT. |
A completion source sample |
Shows how you can author and consume your own completion source class. |
XAML controls; bind to a C++/WinRT property |
A property that can be effectively bound to a XAML control is known as an observable property. This topic shows how to implement and consume an observable property, and how to bind a XAML control to it. |
XAML items controls; bind to a C++/WinRT collection |
A collection that can be effectively bound to a XAML items control is known as an observable collection. This topic shows how to implement and consume an observable collection, and how to bind a XAML items control to it. |
XAML custom (templated) controls with C++/WinRT |
This topic walks you through the steps of creating a simple custom control using C++/WinRT. You can build on the info here to create your own feature-rich and customizable UI controls. |
Passing parameters to projected APIs |
C++/WinRT simplifies passing parameters to projected APIs by providing automatic conversions for common cases. |
Consume COM components with C++/WinRT |
This topic uses a full Direct2D code example to show how to use C++/WinRT to consume COM classes and interfaces. |
Author COM components with C++/WinRT |
C++/WinRT can help you to author classic COM components, just as it helps you to author Windows Runtime classes. |
Move to C++/WinRT from C++/CX |
This topic describes the technical details involved in porting the source code in a C++/CX project to its equivalent in C++/WinRT. |
Interop between C++/WinRT and C++/CX |
This topic shows two helper functions that can be used to convert between C++/CX and C++/WinRT objects. |
Asynchrony, and interop between C++/WinRT and C++/CX |
This is an advanced topic related to gradually porting from C++/CX to C++/WinRT. It shows how Parallel Patterns Library (PPL) tasks and coroutines can exist side by side in the same project. |
Move to C++/WinRT from WRL |
This topic shows how to port Windows Runtime C++ Template Library (WRL) code to its equivalent in C++/WinRT. |
Porting the Clipboard sample to C++/WinRT from C#—a case study |
This topic presents a case study of porting one of the Universal Windows Platform (UWP) app samples from C# to C++/WinRT. You can gain porting practice and experience by following along with the walkthrough and porting the sample for yourself as you go. |
Move to C++/WinRT from C# |
This topic comprehensively catalogs the technical details involved in porting the source code in a C# project to its equivalent in C++/WinRT. |
Interop between C++/WinRT and the ABI |
This topic shows how to convert between application binary interface (ABI) and C++/WinRT objects. |
Strong and weak references in C++/WinRT |
The Windows Runtime is a reference-counted system; and in such a system it's important for you to know about the significance of, and distinction between, strong and weak references. |
Agile objects |
An agile object is one that can be accessed from any thread. Your C++/WinRT types are agile by default, but you can opt out. |
Diagnosing direct allocations |
This topic goes in-depth on a C++/WinRT 2.0 feature that helps you diagnose the mistake of creating an object of implementation type on the stack, rather than using the winrt::make family of helpers, as you should. |
Extension points for your implementation types |
These extension points in C++/WinRT 2.0 allow you to defer destruction of your implementation types, to safely query during destruction, and to hook the entry into and exit from your projected methods. |
A basic C++/WinRT Windows UI Library 2 example (UWP) |
This topic walks you through the process of adding basic support for the Windows UI Library (WinUI) to your C++/WinRT UWP project. Specifically, this topic deals with WinUI 2, which is for UWP apps. |
Windows Runtime components with C++/WinRT |
This topic shows how to use C++/WinRT to create and consume a Windows Runtime component—a component that's callable from a Universal Windows app built using any Windows Runtime language. |
Authoring a C# Windows Runtime component for use from a C++/WinRT app |
This topic walks you through the process of adding a simple C# component to your C++/WinRT project. |
Visual Studio native debug visualization (natvis) for C++/WinRT |
The C++/WinRT Visual Studio Extension (VSIX) gives you Visual Studio native debug visualization (natvis) of C++/WinRT projected types. This provides you an experience similar to C# debugging. |
Configuration macros |
This topic describes the C++/WinRT configuration macros. |
C++/WinRT naming conventions |
This topic explains naming conventions that C++/WinRT has established. |