Get hWnd for XAML control in Windows 8 (Metro) app?
-
09-12-2019 - |
Question
I need to pass a hwnd to a native dll that is going to write raw video to the frame. In WPF this works because you can get a hwnd reference from a control. Is this possible in a Metro app?
Solution
It is not possible to get HWND for a control, because Metro doesn't have HWNDs.
If you can get the video stream, try using a video brush and setting the source. Otherwise, look into SharpDx library, which is a managed port of DirectX. I think you can draw 'stuff' to an element from it.
Hope this helps.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow