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

Method WndProcStatic

BrowserWindow.cpp:53–66  ·  view source on GitHub ↗

FUNCTION: WndProcStatic(HWND, UINT, WPARAM, LPARAM) PURPOSE: Redirect messages to approriate instance or call default proc WM_COMMAND - process the application menu WM_PAINT - Paint the main window WM_DESTROY - post a quit message and return

Source from the content-addressed store, hash-verified

51//
52//
53LRESULT CALLBACK BrowserWindow::WndProcStatic(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
54{
55 // Get the ptr to the BrowserWindow instance who created this hWnd.
56 // The pointer was set when the hWnd was created during InitInstance.
57 BrowserWindow* browser_window = reinterpret_cast<BrowserWindow*>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
58 if (browser_window != nullptr)
59 {
60 return browser_window->WndProc(hWnd, message, wParam, lParam); // Forward message to instance-aware WndProc
61 }
62 else
63 {
64 return DefWindowProc(hWnd, message, wParam, lParam);
65 }
66}
67
68//
69// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)

Callers

nothing calls this directly

Calls 1

WndProcMethod · 0.80

Tested by

no test coverage detected