Universal Windows Apps with Standard C++

This demo shows you how Modern C++ for the Windows Runtime makes it easy to write apps for the new Universal Windows Platform with Standard C++.

It features a framework-less app using the new Windows Composition API. This API is still evolving and I plan to have a course available once it has been finalized. This is just a quick tour of what you can expect.

Now isn’t this the way you’d like to write apps for Windows?

By the way, in the demo I included “windows.applicationmodel.core windows.ui.composition” on the command line and yet I was able to reference Windows::Graphics in my app. How is that possible?

The Modern compiler automatically works out dependencies and includes them in the resulting library to ensure that all references are present. If you include the –depends option it will actually trace this out for you. Here’s what that looks like. Thanks to John Sheehan for raising this question.

C:\temp>modern library -include windows.applicationmodel.core windows.ui.composition -depends

Modern v1.22 - http://moderncpp.com
Modern C++ for the Windows Runtime
Copyright (c) 2015 Kenny Kerr

Reading...
 windows.applicationmodel.core
  windows.foundation
  windows.applicationmodel
   windows.storage
    windows.storage.fileproperties
     windows.devices.geolocation
     windows.storage.streams
    windows.storage.provider
    windows.storage.search
     windows.data.text
    windows.system
     windows.gaming.input
     windows.ui.popups
     windows.ui.viewmanagement
      windows.devices.enumeration
       windows.applicationmodel.background
        windows.applicationmodel.calls.background
        windows.devices.bluetooth
         windows.devices.bluetooth.genericattributeprofile
         windows.devices.bluetooth.rfcomm
          windows.networking
           windows.networking.connectivity
          windows.networking.sockets
           windows.security.credentials
           windows.security.cryptography.certificates
           windows.web
        windows.devices.bluetooth.advertisement
        windows.devices.bluetooth.background
        windows.devices.sensors
         windows.graphics.display
        windows.devices.sms
       windows.ui
      windows.ui.core
       windows.ui.input
        windows.devices.input
       windows.ui.input.inking
        windows.foundation.numerics
       windows.ui.input.inking.core
  windows.applicationmodel.activation
   windows.applicationmodel.appointments.appointmentsprovider
    windows.applicationmodel.appointments
   windows.applicationmodel.calls
    windows.applicationmodel.contacts
   windows.applicationmodel.contacts.provider
   windows.applicationmodel.datatransfer.sharetarget
    windows.applicationmodel.datatransfer
     windows.security.enterprisedata
   windows.applicationmodel.search
   windows.devices.printers.extensions
   windows.media.speechrecognition
    windows.globalization
   windows.security.authentication.web.provider
    windows.security.authentication.web
    windows.security.authentication.web.core
    windows.security.cryptography.core
    windows.web.http
     windows.web.http.filters
     windows.web.http.headers
   windows.storage.pickers.provider
 windows.ui.composition
  windows.graphics.directx.direct3d11
   windows.graphics.directx
  windows.graphics.effects
Projecting...
Writing...

9 thoughts on “Universal Windows Apps with Standard C++

  1. jaycoleman2013

    A wonderfully straight-forward example! Thanks you. How well does ModernCPP blend with DirectX and OpenGL? Lastly (and you’re probably sick of getting this question) when can we play with this library??

    Reply
  2. Skandar

    Ok this is amazing!. I was looking for it. This is Open Source?, it is on your github or how do we support this?. I really I want to use this for some App ideas and demos I have in mind with Standard C++ on Windows 10.

    Reply
  3. Skandar

    Kenny,

    Why not use the open source model using github and you will get lots of contributors and supporters and for sustain economical way you could charge support/consulting etc or have a basic version and an advance version with the advance you could add more advance features with a license fee. I really suggest you this kind of model and works for many people and you can start it today. I think lots of folks are interested on this. The sooner the better.

    Reply
  4. showka (@showka)

    After hearing about it on CppCast and watching this tutorial, I am very disappointed to find this library isn’t actually free. If I had known it wasn’t on GitHub or even available today I probably wouldn’t have Googled it. I do think developers should get paid for their work so that’s nothing against you, I’m just disappointed.

    Microsoft should buy it from you since you’ve spent a very long time on it and would like to recoup your investment. Then they should release it for free themselves. It would of course be amazing if they included it in VS2015 instead of the C++/CX junk but given that it’s Microsoft and VS is a huge product it would probably take them at least a year to update all the samples, new project templates, MSDN articles etc.

    What a shame Microsoft didn’t build the C++ projections this way themselves years ago. After all the hype for C++ support in Windows 8 I had been expecting their APIs to work like yours do from the start.

    Reply
  5. jaycoleman2013

    Agree with some of the later comments here. A tiered license structure to suit single, indie and enterprise. I purposely stay away from UI development in Visual Studio because of the C++ extensions and that hideous ^ symbol. Just today I read an article about doing DirectX development in Visual Studio using the C++ language extensions. Just horrible.

    Would love to see ModernCpp incorporated into VS2015 – maybe as a Nuget package. In the words of Red Leader though, “Stay on target”. This is good work 🙂

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s