Roadmap for Windows Runtime apps using C++
[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]
Here are key resources to help you get started with using C++ (including Visual C++ component extensions (C++/CX)) to develop Windows Runtime apps. This is not a comprehensive list of all of the features or available resources. Some topics listed below are specific to C++, and some are not specific to any single programming language. You can bookmark this page so that you can come back to it when you want to learn how to add another feature to your app.
If you'd rather use another programming language, see:
- Roadmap for Windows Runtime apps using JavaScript
- Roadmap for Windows Runtime apps using C# or Visual Basic
Get started
Essential downloads | Download Windows evaluation copies and Microsoft Visual Studio. |
What kind of app should you make? How do you plan for different devices? How can you monetize your app? Make the right decisions during the planning phase to simplify deployment and maximize your app's potential. |
|
Tips on designing for the modern user experience. |
|
Get started with the tools and create your first Windows Runtime app. |
|
You need to select a template when you start developing your Windows Runtime app. Use this topic to learn what templates to use and what comes with them. |
|
Browse a variety of Windows Store app samples, which you can filter by language. |
|
Browse a variety of Windows Phone Store app samples, which you can filter by language. |
C++/CX reference
High-level page that has links to content that's related to C++. |
|
Table that provides quick info about C++/CX operators and keywords. |
|
Reference content for the types that are supported by C++/CX. |
|
How to compile Windows Runtime apps, and link to static libs and DLLs. |
|
Reference content for the namespaces that contain C++-specific types that can be used in Windows Runtime apps. |
Asynchronous programming with C++
Describes the basic ways to use the task class to consume Windows Runtime asynchronous methods. |
|
Creating Asynchronous Operations in C++ for Windows Store apps |
Describes how to use create_async to produce asynchronous methods. |
Reference documentation for the task class. |
|
In-depth discussion about the task class and how to use it. |
Network programming with C++
For connecting to web services in Windows Runtime apps that target Windows 8.1. |
|
The C++ REST SDK provides support for accessing REST services from native code by providing asynchronous C++ bindings to HTTP, JSON, and URIs. It ships with Visual Studio as an extension SDK to help you write cross-platform C++ HTTP client side code in your Windows Runtime apps as well as desktop apps. |
|
Access Atom and RSS feeds. |
|
Display a web page. |
|
Additional networking APIs in the Windows Runtime. |
|
How to use the C++ REST SDK to connect to a web service, in this case the Bing Maps Location API. |
|
How to connect to Bing Maps using Windows::Web::Http::HttpClient | How to use Windows::Web::Http::HttpClient to connect to a web service, in this case the Bing Maps Location API. |
Game programming in C++
Portal page for game development inWindows Store apps. |
|
Introductory step-by-step tutorial. |
|
Describes how to integrate DirectX surfaces into XAML UI elements. |
|
Background information about app model connection and interop between DirectX and the Windows Runtime. |
Windows Runtime components in C++
High level introduction for all programming languages. | |
Introduces basic concepts in Windows Runtime component development. | |
Walkthrough: Creating a basic Windows Runtime component in C++ and calling it from JavaScript |
Shows the basic steps in creating a Windows Runtime component. |
Developing Bing Maps Trip Optimizer, a Windows Store app in JavaScript and C++ |
End-to-end sample with in-depth examples of many aspects of Windows Runtime component development. |
Windows Runtime C++ Template Library (WRL)
You can use WRL to write C++ applications and components that interact with the Windows Runtime through COM interfaces instead of C++/CX. |
Additional useful libraries for Windows Runtime programming
Windows Runtime types translate to Standard Template Library types. Most C++ Windows Store apps use Standard Template Library collections and algorithms, except at the ABI boundary. |
|
PPL provides algorithms and types that simplify task parallelism and data parallelism on the CPU. |
|
C++ AMP provides access to the GPU for general-purpose data parallelism on video cards that support DirectX 11. |
Basic tasks for Windows Runtime apps
Important Not all of the following topics currently have code examples in C++. However, if an example uses classes from the Windows Runtime—as opposed to libraries that are specific to JavaScript or the .NET Framework—then you can usually translate them to C++/CX with minimal changes. Refer to Visual C++ language reference and Creating Asynchronous Operations in C++ for Windows Store apps for help.
Create controls and connect them to code. |
|
See what controls are available. |
|
See what controls are available in various functional categories. |
|
Add an app bar (needed by most Windows Runtime apps). |
|
Use styles to customize the appearance of your app, and reuse your appearance settings across your app. |
|
Display text and provide controls for entering and editing text. |
|
Position controls and text where you want them. |
|
Make your app work with touch. |
|
Make your app work with the keyboard. |
|
Responding to mouse interactions | Make your app work with the mouse. |
Enable app capabilities like Internet access or document-library access for running in the security sandbox. |
|
Navigate between pages and pass data between them. |
|
This section explains how you can activate, suspend, and resume your Windows Runtime app in response to the normal app lifecycle events, file and protocol associations, and AutoPlay events. This is a must for most apps. |
|
Creating and using tiles, toast, and Windows push notifications |
At the very least you need a tile to allow users to open your Windows Runtime apps. In addition, you can increase the utility and visibility of your app by using notifications and creating "live tiles". |
Print from your app. |
|
Accessibility for Windows Runtime apps using C#/VB/C++ and XAML |
Make your app accessible. A Windows Runtime app with a XAML UI can provide app-specific information that is reported to any Microsoft UI Automation client. This includes common assistive technologies such as screen readers. |
Windows is used worldwide and so it is important for you to design your Windows Runtime app to appeal to an international audience in order to get maximum distribution. |
|
Add a splash screen to provide your users with immediate feedback as your app loads its resources. |
|
The Windows Store lets you reach the millions of customers who use Microsoft Windows. |
Rich visuals and media
Learn how to include images into your Windows Runtime app UI. |
|
An introduction to how animation works in XAML. |
|
Animations are built into many of the controls you use; however, you can add the same library of animations to other components of your UI and even create your own animations when you need to. |
|
Integrate media into your app. |
|
Draw scalable vector graphics shapes, such as ellipses, rectangles, polygons, and paths. |
|
Draw with various colors, gradients, and bitmap sources. |
|
You can apply 3-D effects to content in your Windows Runtime app using perspective transforms. For example, you can create the illusion that an object is rotated toward or away from you. |
Working with data
Bind a control to a single item or bind a list control to a collection of items. This can be used for displaying data, such as stock prices or headlines, in controls. For detailed info, see Data binding with XAML. |
|
Read from and write to a file. |
|
Let the user open or save a file. |
|
Use data binding features in a XAML UI, including features such as change notification, binding to collections, incremental loading, grouping, and per-binding data conversions. |
|
Learn how Windows Runtime apps can store data and about the scenarios where the various app data techniques work best. |
Sensors
Use motion and orientation sensors. |
|
Use an ambient light sensor. |
|
Use location services. |
|
Provide maps and directions in Windows Phone Store apps. |
Searching, sharing, and connecting
You can help users pick files from one app directly within another app. Users gain freedom and flexibility. Apps increase their popularity by supporting the File Open Picker contract. |
|
Great apps make it easy for users to share what they are doing with their friends and family. Apps that support the Share contract can automatically share content to and from any other app that also supports the Share contract. |
|
You can use the association launching API to launch the user's default app for a file type or protocol. You can also enable your app to be the default app for a file type or protocol. |
|
Use proximity to connect computers with a simple tap gesture. If two computers are near each other, or are tapped together, the operating system becomes aware of the nearby computer. |
|
Streaming media to devices using Play To | Use the Play To contract to let users stream audio, video, or images from their computer to devices in their home network. |
Supporting AutoPlay | Use AutoPlay events to make your app do the right thing automatically when a device is connected to the computer, or a camera memory card, thumb drive, or DVD is inserted into the computer. |
Learn how to how to set network capabilities required for network access, how to handle network connections as background tasks, and how to secure and troubleshoot network connections for a Windows Runtime app. |
Guidelines and best practices
Detailed UX guidelines for Windows Runtime apps | Use this resource to find best practices for a variety of specific design implementations and features like file pickers, SemanticZoom, cross-slide, and so on. |
Windows provides a concise set of touch interactions that are used throughout the system. Applying this touch language consistently makes your app feel familiar to what users already know. |
|
Performance best practices for Windows Store apps | Here are some concepts and guidelines to consider to ensure that your app performs well. |
Describes the guidelines that you should follow if you want to declare that your app is accessible, as part of the Windows Store submission process. |
The programming model for Windows Runtime apps using C#/VB/C++
This topic provides a full overview on the XAML markup language as it is used by the Windows Runtime, and links to related reference and conceptual material such as how to use each XAML markup extension, and how to use XAML names. |
|
The Windows Runtime includes many asynchronous APIs, for example methods of MediaCapture and StorageFile, so that your app remains responsive when it accesses functionality that might take an extended amount of time. Your app can remain responsive because large operations can complete asynchronously while the main thread execution continues. Most of the asynchronous APIs don't have synchronous counterparts, so you need to be sure to understand how to use the asynchronous APIs with C# or Microsoft Visual Basic in your Windows Runtime app. |
|
Your Windows Runtime app uses dependency properties. Dependency properties are a Windows Runtime concept that supports other common features such as animation, styles and data binding. |
|
Wire your app's event handlers in XAML. Learn about the routed event concept, which is relevant to many UI-related events of the UIElement class. |
|
A resource dictionary is a way you can declare a resource item in XAML markup, which you can then access as a shared value for other XAML-defined properties by using a StaticResource markup extension. |
|
Define your own custom property that can participate in data binding, styles, animations, and callbacks for real-time value changes. |
|
Storyboarded animations are custom animations that target dependency property values and change them over time. This isn't just for traditional visually oriented animations, it's also a way to implement app states and add run-time behavior. |
|
Key-frame animations are type of storyboarded animation that can set intermediate values along a timeline using a key-frame metaphor. Easing functions are a way to change the interpolation of values while the animation runs. These are both useful for defining a more advanced style of animation than is possible with either a simple storyboarded animation or the animation library. |
|
Visual states are a technique for applying sets of property changes that are in response to a known state of a control, page, or other part of your app. You use storyboarded animations to define visual states, and there are best practices you should follow when you use storyboarded animations for a visual state. |
API reference
Here are the key APIs that are supported in Windows Runtime apps that use C++/CX.
API | Description |
---|---|
If you are familiar with platforms like Microsoft Silverlight, many of these APIs may be familiar. (They have "XAML" in the namespace name.) The Windows Runtime is made up of native APIs that are built into the operating system. The Windows Runtime API is fundamental to Windows Runtime app programming. It's implemented in C++ and supported in JavaScript, C#, Visual Basic, and C++/CX. |
|
Reference content for the namespaces that contain C++-specific types that can be used in Windows Runtime apps. |
Samples
Samples page that you can filter for C++. |
|
Windows Store Hello Windows app in C++ | Introduces the C++/CX language extensions and development environment. |
Windows Store Simple Blog Reader C++ app sample | Shows how to retrieve RSS data from the internet. |
Developing an end-to-end Windows Store app using C++ and XAML: Hilo | Larger sample that shows how to use C++/CX, the Windows Runtime, asynchronous programming, XAML, and development patterns such as Model-View-ViewModel (MVVM) in your Windows Store app using C++. |