I am developing a platform independent C++20 library (pure C++, no windows component) in VS2022, which among other things has a standardized error and message reporting subsystem.
While the whole library is a standard C++ DLL/Static lib I now want to add a single XAML form to it for standardizing the display of error information on Windows. I tried to simply add a blank WInUI form but this is missing the context setup of a regular WinUI/WinRT project (header file includes...).
The project has Microsoft.Windows.CppWinRT and Microsoft.UI.Xaml packages installed.
Adding a new library project to the solution for the window could be an option but I could not see how this could be done so far. For example a WinUI/RT component library, but then again how to use it from the C++ libray. I guess that approach would just shift the problem.
I hope there is a solution to my problem.
P.S.: until now I have never used WinUI/RT in C++. All GUI programming was done using C#/WPF so far.