src/Build2020Demo/DemoBuildCpp/DemoBuildCpp/DemoBuildCpp/App.xaml.cpp
void App::OnLaunched(LaunchActivatedEventArgs const&)
{
    HWND hwnd;
    window = make<MainWindow>();
    window.as<IWindowNative>()->get_WindowHandle(&hwnd);
    window.Activate();

    // The Window object doesn't have Width and Height properties in WInUI 3 Desktop yet.
    // To set the Width and Height, you can use the Win32 API SetWindowPos.
    // Note, you should apply the DPI scale factor if you are thinking of dpi instead of pixels.
    setWindowSize(hwnd, 800, 600);
}
/// <summary>
/// Invoked when the application is launched normally by the end user.  Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>

Invoked when the application is launched normally by the end user.  Other entry points
will be used such as when the application is launched to open a specific file.

Details about the launch request and process.
Invoked when the application is launched normally by the end user . Other entry points will be used such as when the application is launched to open a specific file . Details about the launch request and process .
void App::OnLaunched(LaunchActivatedEventArgs const&)
{
    HWND hwnd;
    window = make<MainWindow>();
    window.as<IWindowNative>()->get_WindowHandle(&hwnd);
    window.Activate();
    setWindowSize(hwnd, 800, 600);
}
void App :: OnLaunched ( LaunchActivatedEventArgs const & ) { HWND hwnd ; window = make < MainWindow > ( ) ; window . as < IWindowNative > ( ) -> get_WindowHandle ( & hwnd ) ; window . Activate ( ) ; setWindowSize ( hwnd , 800 , 600 ) ; }
<summary>
Invoked when the application is launched normally by the end user.
<summary > Invoked when the application is launched normally by the end user .
// The Window object doesn't have Width and Height properties in WInUI 3 Desktop yet. // To set the Width and Height, you can use the Win32 API SetWindowPos. // Note, you should apply the DPI scale factor if you are thinking of dpi instead of pixels.