Register the Win32 window class for the app window.
| 305 | |
| 306 | // Register the Win32 window class for the app window. |
| 307 | PCWSTR AppWindow::GetWindowClass() |
| 308 | { |
| 309 | // Only do this once |
| 310 | static PCWSTR windowClass = [] |
| 311 | { |
| 312 | static WCHAR windowClass[s_maxLoadString]; |
| 313 | LoadStringW(g_hInstance, IDC_WEBVIEW2APISAMPLE, windowClass, s_maxLoadString); |
| 314 | |
| 315 | WNDCLASSEXW wcex; |
| 316 | wcex.cbSize = sizeof(WNDCLASSEX); |
| 317 | |
| 318 | wcex.style = CS_HREDRAW | CS_VREDRAW; |
| 319 | wcex.lpfnWndProc = WndProcStatic; |
| 320 | wcex.cbClsExtra = 0; |
| 321 | wcex.cbWndExtra = 0; |
| 322 | wcex.hInstance = g_hInstance; |
| 323 | wcex.hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_WEBVIEW2APISAMPLE)); |
| 324 | wcex.hCursor = LoadCursor(nullptr, IDC_ARROW); |
| 325 | wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); |
| 326 | wcex.lpszMenuName = MAKEINTRESOURCEW(IDC_WEBVIEW2APISAMPLE); |
| 327 | wcex.lpszClassName = windowClass; |
| 328 | wcex.hIconSm = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_WEBVIEW2APISAMPLE)); |
| 329 | |
| 330 | RegisterClassExW(&wcex); |
| 331 | return windowClass; |
| 332 | }(); |
| 333 | return windowClass; |
| 334 | } |
| 335 | |
| 336 | LRESULT CALLBACK AppWindow::WndProcStatic(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) |
| 337 | { |
nothing calls this directly
no outgoing calls
no test coverage detected