3

How to get the HWND part used for hosting the UIElement from a UWP project on a XamlIsland WinRT/C++ based application? The HWND I mean can be:

  1. Desktop application
  2. Window or other UI element (HWND)
  3. Internal native window (HWND)

enter image description here

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36
Donny1605
  • 31
  • 2
  • Can we iterate over the parent of a UIElement until we get `DesktopWindowXamlSource` and call the `.as().get_WindowHandle(&hwnd)` method? – Donny1605 Apr 24 '22 at 09:47
  • 1
    I'm guessing that's a feasible approach. See if the code [here](https://stackoverflow.com/a/70363785/1889329) works for navigating up to the next `DesktopWindowXamlSource`. – IInspectable Apr 24 '22 at 10:24

0 Answers0