Skip to main content

Questions tagged [c++-winrt]

C++/WinRT is a standard, native C++17 language projection for the Windows Runtime using modern C++ guidelines. It is the preferred alternative to C++/CX and WRL. This tag should be used with questions concerning using the features and functionality of C++/WinRT. Add the appropriate tag for the application type such as UWP as well. C++/WinRT is not C++/CX nor WRL so questions regarding those should probably not use this tag.

0 votes
0 answers
56 views

C++/WinRT RequestAsync memory leak

I'm trying to figure out the cause of a memory leak in the following program. Running it causes memory usage to increase from 2MB -> 5MB (as reported by Visual Studio diagnostic tools) in about ...
Descolada's user avatar
0 votes
0 answers
64 views

How to utilize SetColor(Windows::UI::Colors::Red) from a Non-UWP and Non-C++/WinRT DLL file?

I have developed a C++ DLL without utilizing UWP or C++/WinRT. Within this DLL, I am employing Windows::Devices::Lights::LampArray^ lamp to retrieve information about the lamp, such as lamp->...
sunil's user avatar
  • 19
1 vote
1 answer
108 views

How to implement unit tests for WinUI3 (C++) application

At the moment, I have created a test project using a project template from Visual Studio Unit Test App (Winui 3) and my code looks like this namespace TestMyWinrtApp { TEST_CLASS(CppUnitTests) ...
Joe J's user avatar
  • 11
0 votes
1 answer
86 views

Unpackaged Desktop App: Binding to own dependency properties is not working

The demo project contains a simple GUI with a button and a derived user control MyUserControl. MyUserControl only contains a border whose background is bound to the background of the user control: ...
Waterman's user avatar
  • 131
0 votes
0 answers
59 views

CAtlServiceModuleT and CoInitializeSecurity: what to set?

We have a service created with CAtlServiceModuleT hosting one single COM coclass. The documents doesn't really tell much, but by experiment I found out that in order to allow non-elevated processes to ...
Agritite's user avatar
0 votes
2 answers
96 views

FileOpenPicker "invalid window handle" exception

This is a follow-on question to Guarang Dave's question. With @Simon_Mourier's help, he figured it out, but I still haven't. I'm trying to do what ought to be a simple task: open a FileOpenPicker ...
dr_eck's user avatar
  • 145
0 votes
0 answers
68 views

C++/WinRT idiomatic way to dispose of smart pointer class fields

Say I have a basic WinRT class: // midl runtimeclass Class: IClosable { Class(); } // .h struct Class : ClassT<Class> { Class() = default; void Close(); ~Class(); private: ...
Blindy's user avatar
  • 66.7k
0 votes
0 answers
68 views

Acrylic does not work properly. Start the APP before turning on the transparency effect

1.Start the app after turning off the transparency effect in Windows 11 settings. After launching the app and then turning on the transparency effect from Windows settings, Acrylic will not work ...
Jzhang's user avatar
  • 17
0 votes
0 answers
57 views

StoreContext.GetAppLicenseAsync returns no cached license when device is offline

This is a classic Win32 application distributed on MS Store. At startup, it checks the status of the product license. See excerpt below (C++/WinRT): #include <Windows.Foundation.h> #include <...
josuegomes's user avatar
0 votes
1 answer
40 views

Use `winrt.windows.media.control` in Node.js or Rust

In the following python code I get the currently playing media / music from windows. To display it on a electron app i would prefer to get the data using Node.js (or Rust for Tauri): import asyncio ...
Résu's user avatar
  • 27
1 vote
1 answer
111 views

Callback for monitoring the creating of files/folder and the changes in the files in Cloud Files API

In Cloud Files API, the platform invokes the respective callback function for the callback types. there is a callback type for everything - reading, moving, deleting, renaming, list fetching - but I ...
Vembu karthick's user avatar
0 votes
1 answer
52 views

IJsonValue.GetObject Method collides with windows.h macro

https://learn.microsoft.com/en-us/uwp/api/windows.data.json.ijsonvalue.getobject?view=winrt-22621 #include <winrt/Windows.Data.Json.h> #define WIN32_LEAN_AND_MEAN #define NOMINMAX #include <...
Tom Huntington's user avatar
0 votes
0 answers
36 views

Im trying to read a file in cpp/clr and perform calculations on it and display it using GUI but Im getting errors Im not familair with

I am opening the file in binary mode and trying to get the first digit (number_of_poly) in the first row, the total number of rows, and the second digit (number_of_vars) in the second row, the total ...
Abdullah Ejaz's user avatar
0 votes
0 answers
126 views

How to use C++/WinRT API as part of C++ DLL without relying on the UWP UI portion?

I am attempting to utilize the C++/WinRT code provided in the sample of LampArray, cppwinrt to create a C++ DLL. However due to the tight coupling of this sample with the UI, I am not able to use ...
sunil's user avatar
  • 19
5 votes
0 answers
66 views

How to attach Nuget package.config file for C++ cmake project

I’m working on CPP WinUI3 desktop application with cmake. By default WinUI3 project uses MSBuild. We made the project use cmake with the help of this sample project. ref - https://github.com/...
Harshith's user avatar
  • 281

15 30 50 per page
1
2 3 4 5
48