| 14 | static constexpr WCHAR c_samplePath[] = L"WebView2SamplePage.html"; |
| 15 | |
| 16 | AppWindow::AppWindow() : m_winComp(std::make_unique<CompositionHost>()) |
| 17 | { |
| 18 | WCHAR szTitle[MAX_LOADSTRING]; // The title bar text |
| 19 | CHECK_FAILURE(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED)); |
| 20 | LoadStringW(hInst, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); |
| 21 | |
| 22 | // Perform application initialization: |
| 23 | m_mainWindow = CreateWindowW( |
| 24 | GetWindowClass(), szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, |
| 25 | nullptr, nullptr, hInst, nullptr); |
| 26 | SetWindowLongPtr(m_mainWindow, GWLP_USERDATA, (LONG_PTR)this); |
| 27 | ShowWindow(m_mainWindow, nCmdShow); |
| 28 | UpdateWindow(m_mainWindow); |
| 29 | |
| 30 | m_sampleUri = GetLocalUri(c_samplePath); |
| 31 | InitializeWebView(); |
| 32 | } |
| 33 | |
| 34 | // Register the Win32 window class for the app window. |
| 35 | PCWSTR AppWindow::GetWindowClass() |
nothing calls this directly
no outgoing calls
no test coverage detected