MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Browser / wWinMain

Function wWinMain

WebViewBrowserApp.cpp:15–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13void tryLaunchWindow(HINSTANCE hInstance, int nCmdShow);
14
15int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
16 _In_opt_ HINSTANCE hPrevInstance,
17 _In_ LPWSTR lpCmdLine,
18 _In_ int nCmdShow)
19{
20 UNREFERENCED_PARAMETER(hPrevInstance);
21 UNREFERENCED_PARAMETER(lpCmdLine);
22
23 // Call SetProcessDPIAware() instead when using Windows 7 or any version
24 // below 1703 (Windows 10).
25 SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
26
27 BrowserWindow::RegisterClass(hInstance);
28
29 tryLaunchWindow(hInstance, nCmdShow);
30
31 HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_WEBVIEWBROWSERAPP));
32
33 MSG msg;
34
35 // Main message loop:
36 while (GetMessage(&msg, nullptr, 0, 0))
37 {
38 if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
39 {
40 TranslateMessage(&msg);
41 DispatchMessage(&msg);
42 }
43 }
44
45 return (int) msg.wParam;
46}
47
48void tryLaunchWindow(HINSTANCE hInstance, int nCmdShow)
49{

Callers

nothing calls this directly

Calls 1

tryLaunchWindowFunction · 0.85

Tested by

no test coverage detected