question

vaishalisharma-7916 avatar image
0 Votes"
vaishalisharma-7916 asked NicoZhu-MSFT commented

How to get handle for UI element in uwp

I have a UWP App. I need to host multiple windows on my main window. I tried using Win32 API SetParent but it overrides my parent window UI components.

windows-uwp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
1 Vote"
Castorix31 answered NicoZhu-MSFT commented

UI elements have no handle (only the main window)
You get them with VisualTreeHelper

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I want to use SwapChainPanel to render video in my APP. I am using a cpp api that takes hwnd of View(where video is suppose to be rendered) and renders video on that. We want to adapt this API for our UWP App. Is there a way where I can use SWAPChainPanel or any other UI element which can provide me its Hwnd that I can pass to my cpp API to render the video. Thank you in advance.

0 Votes 0 ·

I'm afraid currently there are no supported APIs for UWP that accept an HWND.

0 Votes 0 ·