I am working on a C++ WinUI3 project and got this problem. How do I obtain the handle of a XAML grid?
Something like this in QT can achieve it:
HWND m_hWnd;
m_hWnd = (HWND)(ui.label->winId());
But I couldn't find the similar thing in WinUI3. I look up on the Internet, but only find this solution which is in C#:
And the Microsoft provide this, but it is only working for window handle, not XAML controls.
Retrieve a window handle (HWND)
Could anyone help me with it? Any suggestions will be great!