Hacker News new | past | comments | ask | show | jobs | submit login

Using WinRT stuff in a Win32 app is quite simple. Add windowsapp.lib, #include "winrt/Windows.Foundation.h", and call winrt::init_apartment();. There's no easy way to embed Xaml controls, though. I think the only option would be to have a separate Xaml window, get its HWND, and SetWindowLong+SetParent to force it to be a child window.



There's this: Walkthrough: Hosting WPF Content in Win32[0]

That does use C++/CLI though, but I'm sure you can play around with the embedded api if you really want a pure C++ solution.

[0] https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanc...


WPF ≠ UWP XAML, which is what the EdgeHTML control is.


Well, the controls in question here are WPF and WinForms hosts for UWP controls, so if you can host WPF then you can use the UWP host control to host UWP content. Yeah, its a bit roundabouts, but I think it is the only supported way right now.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: