I'm working on the WinUI3 desktop application. I'm trying to set an ID to the winui3 window and get the WinUI3 window back with only the ID. I could not find any direct way to do this.
I tried to extract HWND from the WinUI3 window and set the ID using SetProp.
uWindow.try_as<::IWindowNative>()->get_WindowHandle(&hWnd);
SetProp(hWnd,"ID","WindowID")
But it doesn't fit well as per my requirements. I want to get the WinUI3 Window back when I have only the ID, I was able to get the HWND of the window back from the ID which I set as the property for HWND, but I was not able to get back the WinUI3 Window from that HWND.
It would be of great help if you could help me get the WinUI3 window back from HWND of its native window.
Thank you