Run the message pump for one thread.
| 32 | |
| 33 | // Run the message pump for one thread. |
| 34 | int RunMessagePump() |
| 35 | { |
| 36 | HACCEL hAccelTable = LoadAccelerators(hInst, MAKEINTRESOURCE(IDC_WEBVIEW2SAMPLEWINCOMP)); |
| 37 | |
| 38 | MSG msg; |
| 39 | |
| 40 | // Main message loop: |
| 41 | while (GetMessage(&msg, nullptr, 0, 0)) |
| 42 | { |
| 43 | if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) |
| 44 | { |
| 45 | TranslateMessage(&msg); |
| 46 | DispatchMessage(&msg); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | return (int) msg.wParam; |
| 51 | } |