Get Hwnd of swapchainpanel in UWP Application

vaishali sharma 21 Reputation points
2021-10-12T08:29:59.903+00:00

I have a UWP App that uses a C++ API to render videos. The C++ API takes IntPtr of panel where we need to render the video as input. In Winforms, I can directly pass a panel's Handle where the video will be rendered. How can I do the same in UWP. I am thinking to use SwapChainPanel as a canvas to render video.

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 82,751 Reputation points
    2021-10-12T10:32:38.597+00:00

    You can see the sample SwapChainPanel DirectX interop sample
    which uses a C++ D3DPanel class inherited from SwapChainPanel :

    139866-uwp-swapchainpanel.jpg