Windows.UI.Composition-Win3.../cpp/HelloComposition
Robert Mikhayelyan 830f854128
Update C++ samples to use Visual Studio 2022, Platform Toolset v143, and the latest C++/WinRT (#109)
* Update AdvancedColorImages (cpp)

* Update HelloComposition (cpp)

* Update HelloVectors (cpp)

* Update ScreenCaptureforHWND (cpp)

* Update VirtualSurfaces (cpp)

* Fix null deref in VisualLayerIntegration (dotnet wpf)

* Use "latest" SDK for cpp projects

* Update cpp READMEs

* Fix accidental move of header file

* update to latest C++/WinRT version
2023-01-09 19:14:34 -08:00
..
HelloComposition Update C++ samples to use Visual Studio 2022, Platform Toolset v143, and the latest C++/WinRT (#109) 2023-01-09 19:14:34 -08:00
HelloComposition.sln First set of samples for MVP summit (#19) 2019-03-19 04:05:40 -07:00
README.md Update C++ samples to use Visual Studio 2022, Platform Toolset v143, and the latest C++/WinRT (#109) 2023-01-09 19:14:34 -08:00
app-ui.png Second set of samples including Acrylic and Advanced Color. (#34) 2019-06-12 09:45:46 -07:00

README.md

Win32 HelloComposition sample

This sample contains the code created in the Using the Visual Layer with Win32 tutorial. It's a simple user interface (UI) that demonstrates how to add Universal Windows Platform (UWP) Visual Layer content to a C++ Win32 app.

The Visual Layer APIs provide a high performance, retained-mode API for graphics, effects, and animations. It's the recommended replacement for DirectComposition in apps that run on Windows 10.

This sample demonstrates how to set up the interop code needed to use these APIs in a C++ Win32 app.

App user interface

Features

This sample includes the following features:

  • A host class that implements interop between Win32 and UWP Composition APIs.
  • Simple use of Composition visuals, brushes, and animations.

Run the sample

This sample requires:

Code at a glance

CompositionHost

The main feature of this sample is the CompositionHost class, which contains the code to set up interop between Win32 and the UWP Visual Layer.

The CompositionHost class is written in C++/WinRT. For more info about using C++/WinRT with an existing C++ Win32 desktop app, see Get started with C++/WinRT - Modify a Windows Desktop application project to add C++/WinRT support.

See also