title: Win32 control not showing up in Winui3
body: <p>I want a Winui3 window, to host a Win32 control, I tried the following:</p>
  <p>App.xaml.cs:</p>
  <pre><code>protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
  {
      m_window = new MainWindow();
      var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(m_window);
      var ctrl = CreateWindow(&quot;EDIT&quot;, &quot;Edit&quot;, WindowStyles.WS_CHILD | WindowStyles.WS_VISIBLE, 100, 100, 300, 50, hwnd, (IntPtr)0, (IntPtr)0, (IntPtr)0);
          
      m_window.Activate();
  }
  </code></pre>
  <p>Unfortunately, the control did not show up directly, It was only visible if you resize the window really fast.
  I think that's because the control is created behind the XAML. I tried to fix this, by setting the WindowStyle to TopMost, but it didn't work either.</p>
  <pre><code>SetWindowPos(ctrl, (IntPtr)(-1), 0, 0, 0, 0, SetWindowPosFlags.SWP_NOMOVE | SetWindowPosFlags.SWP_NOSIZE);
  </code></pre>
  <p>Is there a workaround, or did I forget something?</p>
  <p>The documentation, to access Win32 apis:
  <a href="https://docs.microsoft.com/en-us/windows/apps/winui/winui3/desktop-winui3-app-with-basic-interop" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/apps/winui/winui3/desktop-winui3-app-with-basic-interop</a></p>