Showing posts with label WinRT. Show all posts
Showing posts with label WinRT. Show all posts

Monday, 1 October 2018

Projections, Projections Everywhere - C++17 comes to Town

In a nutshell.
  1. C++/CX ("component extensions") are extensions to C++ to create  Windows Runtime (WinRT) applications in as native a C++ style as possible
  2. C++/WinRT is the recommended alternative to interacting with WinRT (available in the Windows 10 SDK from version 1803 onwards) and is C++17 language compatible
  3. Projections are thee new name for bindings
Roughly speaking, WinRT is the Win32 API ported from C to C++, with a whole load of new stuff for Windows 10 and beyond.

Wednesday, 5 November 2014

The Two Sets of APIs to Build Windows Runtime Apps

These APIs are Windows Runtime and WinJS.  The latter enables you to build HTML/JavaScript applications with equivalent functionality to XAML (specifically the Windows.UI.Xaml namespace equivalent functionality).

WinJS.Application provides application level functionality such as activation, storage and application events. When you create a new Windows JavaScript application, you'll see this namespace referenced in the default.js under the js folder of your solution.

Sunday, 31 August 2014

Programming at the API Boundary in Windows 8: C++ Component Extensions

The WinRT - What CX is All About

C++/CX (Component Extensions) borrows from C++/CLI but targets the Windows Runtime (WinRT) and native code instead of the CLR and managed code.

It is not Managed C++, though it looks a bit like it.  Neither is it perfectly obedient, standard C++. It is C++ with a bit of "Microsoft spice" added to the fray.

Can thou givest an example of "Microsoft Spice" added to the fray?

Among the so-called "component extensions" is support for partial classes, mainly for auto-merging generated code with developer code. Partial classes are not part of the C++ standard (at least, not as part of C++11).

The entry point - notion of the "ref class"

To use "component extensions" you must declare your class as a "ref class" e.g. public ref class SuperClass. To make it partial, you can whack a partial on the front: partial ref class SuperClass.

C++/CX also supports runtime generics (versus compile-time generics in the STL). However, support for compile time generics remains in place.