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

Method RegisterClass

BrowserWindow.cpp:20–41  ·  view source on GitHub ↗

FUNCTION: RegisterClass() PURPOSE: Registers the window class.

Source from the content-addressed store, hash-verified

18// PURPOSE: Registers the window class.
19//
20ATOM BrowserWindow::RegisterClass(_In_ HINSTANCE hInstance)
21{
22 // Initialize window class string
23 LoadStringW(hInstance, IDC_WEBVIEWBROWSERAPP, s_windowClass, MAX_LOADSTRING);
24 WNDCLASSEXW wcex;
25
26 wcex.cbSize = sizeof(WNDCLASSEX);
27
28 wcex.style = CS_HREDRAW | CS_VREDRAW;
29 wcex.lpfnWndProc = WndProcStatic;
30 wcex.cbClsExtra = 0;
31 wcex.cbWndExtra = 0;
32 wcex.hInstance = hInstance;
33 wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_WEBVIEWBROWSERAPP));
34 wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
35 wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
36 wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WEBVIEWBROWSERAPP);
37 wcex.lpszClassName = s_windowClass;
38 wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
39
40 return RegisterClassExW(&wcex);
41}
42
43//
44// FUNCTION: WndProcStatic(HWND, UINT, WPARAM, LPARAM)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected