c++-winrt Questions

4

I have been searching around the web. I get that: C++/WinRT is provided as a standard C++17 header file library But what is it really? Is it a new Object oriented replacement for the age-old W...
Levina asked 1/2, 2020 at 22:41

1

I would like to use libraries available via WinRT API (like these) from my application created using Qt 5.9.2 MinGW 32bit. I got Windows 10 OS. Now, I have set up a kit as presented below. Then...
Fruitcake asked 23/2, 2018 at 19:48

3

I have a XAML C++/WinRT application based on the BlankApp template. As I built up the app, I realized that my application is throwing a lot of exceptions behind the scenes in my output window. The ...
Chauffeur asked 10/4, 2019 at 2:4

1

Solved

I am writing a C++ coroutine for a UWP control using C++/WinRT: winrt::fire_and_forget MyControl::DoSomething() { if (/* some condition */) { // Why does this work?! return; } co_await winrt...
Choriocarcinoma asked 20/1, 2022 at 19:57

1

Solved

As far as I understand, Windows Runtime is the new infrastructure through which Windows exposes its APIs. My question is simple: how can I use that from pure C code? I don't mind writing more code,...
Plainclothesman asked 21/12, 2020 at 5:19

1

Solved

C++/WinRT provides 3 flavors of smart pointers to use for COM objects - Microsoft::WRL::ComPtr, com_ptr, and ATL-based CComPtr. In my case, it is a COM-lite object, meaning it is NOT an in-pr...
Aerophobia asked 2/9, 2020 at 6:0

2

The documentation shows this C# snippet: async void DisplayDeleteFileDialog(){ ContentDialog deleteFileDialog = new ContentDialog{ Title = "Delete file permanently?", Content = "If you delete t...
Seneca asked 16/1, 2019 at 2:38

1

I have the following WinRT code which works fine to discover active VPN Profiles: VpnManagementAgent vpn; auto profiles = vpn.GetProfilesAsync().get(); wprintf(L"Found %d profiles\n", profiles.Siz...
Sympathin asked 17/10, 2018 at 12:21

0

I'll try to summarize my issue as concisely as I can: I have a legacy C++ project that uses WinAPI to create and manage UI elements. I want to replace this with a more modern framework that...
Fasciate asked 19/6, 2020 at 16:0

1

Solved

I'm interesting in ISystemMediaTransportControlsInterop::GetForWindow method. The documentation is outdated for it. But I have found files SystemMediaTransportControlsInterop.h and SystemMediaTrans...
Pronghorn asked 5/6, 2020 at 19:27

1

Solved

Project files have these settings in a PropertyGroup named Globals: <PropertyGroup Label="Globals"> ... <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <W...

1

Solved

In my C++/WinRT project, I am trying to run some code on UI thread but getting an error that says: "winrt::impl::consume_Windows_UI_Core_ICoreDispatcher<winrt::Windows::UI::Core::ICoreDispatc...
Attis asked 11/8, 2019 at 13:4

2

There are various related questions that give a hint how to add a new XAML Page properly to a WinRT/C++ project in Visual Studio, but none are specific to C++/WinRT. (I.e, here, here, and here.) F...
Caius asked 16/7, 2019 at 19:40

2

Solved

What's the C++ WinRT equivalent for what in the Win32 API would be registering a window class, creating a window and then keeping it alive via a message pump loop? I'm currently looking at and rea...
Suffragan asked 4/7, 2019 at 18:36

0

I have got WPF c# server application (WCF) and want to use c++/WinRT dynamic library inside it. I can simply do this by using UWP desktop bridge with WPF app and UWP empty app that includes my dll....
Smail asked 17/12, 2018 at 12:44

2

Solved

Trying to compile the following code: #include <winrt/base.h> int main() {} With the following compiler options: /permissive- /std:c++latest With recently released Visual Studio 15.8 P...
Saltant asked 27/6, 2018 at 15:40

1

Solved

I have a Win32 programm, where I want to add some winRT calls. Among other things I want to open a file without a GUI interface. I use the async file open call from the StorageFile class, because...
Barcellona asked 16/10, 2018 at 16:39

1

Solved

I just heard about C++/WinRT and I'm surprised that C++ has this runtime which adds high-level class wrappers like .NET does. But I don't want to distribute my apps as UWP apps. Can I use C++/WinRT...
Cicerone asked 25/9, 2018 at 17:54

1

I'm working with a native C++ app which has a plugin system where it will LoadLibrary()/GetProcAddress() on a .dll to call functions. I'd like to implement one of these plugins, and inside the plug...
Oestriol asked 20/9, 2018 at 23:48

1

Solved

I am trying to implement a custom XAML control in code, using C++/WinRT. My attempted implementation, however, failed to compile. As a prove of concept I was using this code: #pragma once #incl...
Pyrostat asked 12/6, 2018 at 19:52

1

Solved

After spending a bit of time with simple UWP applications with C++/CX and ++/WinRT I have begun to enjoy some of the features of targeting that environment for Windows UI app development. Now havi...
Imprecise asked 3/6, 2018 at 17:27

2

Solved

I need to use win2D in my cppwinrt project. Using the Win2D sample file as a model I’ve tried to mimic its setup, putting in the package file for win2d from that project, duplicating the custom bui...
Cuyp asked 17/3, 2018 at 21:38

1

Solved

I have started experimenting with C++/WinRT using Visual Studio 2017 Community Edition. I now have an environment in which I can build a debug version of a sample application and run it. I had to: ...
Accrescent asked 8/5, 2018 at 16:37

2

Solved

Earlier this week, Kenny Kerr presented C++/WinRT at CppCon 20161. It is a Standard C++ projection for the Windows Runtime, based on Modern. As far as I understand, the C++/CX compiler/preprocesso...
Bassinet asked 25/9, 2016 at 11:32
1

© 2022 - 2024 — McMap. All rights reserved.