MCPcopy Create free account
hub / github.com/apache/arrow / WndProc

Method WndProc

cpp/src/arrow/flight/sql/odbc/odbc_impl/ui/custom_window.cc:50–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50LRESULT CALLBACK CustomWindow::WndProc(HWND hwnd, UINT msg, WPARAM wparam,
51 LPARAM lparam) {
52 CustomWindow* window =
53 reinterpret_cast<CustomWindow*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
54
55 switch (msg) {
56 case WM_NCCREATE: {
57 ARROW_DCHECK_NE(lparam, NULL);
58
59 CREATESTRUCT* create_struct = reinterpret_cast<CREATESTRUCT*>(lparam);
60
61 LONG_PTR long_self_ptr = reinterpret_cast<LONG_PTR>(create_struct->lpCreateParams);
62
63 SetWindowLongPtr(hwnd, GWLP_USERDATA, long_self_ptr);
64
65 return DefWindowProc(hwnd, msg, wparam, lparam);
66 }
67
68 case WM_CREATE: {
69 ARROW_DCHECK_NE(window, NULL);
70
71 window->SetHandle(hwnd);
72
73 window->OnCreate();
74
75 return 0;
76 }
77
78 default:
79 break;
80 }
81
82 if (window && window->OnMessage(msg, wparam, lparam)) return 0;
83
84 return DefWindowProc(hwnd, msg, wparam, lparam);
85}
86
87CustomWindow::CustomWindow(Window* parent, const wchar_t* class_name,
88 const wchar_t* title)

Callers

nothing calls this directly

Calls 3

SetHandleMethod · 0.80
OnCreateMethod · 0.45
OnMessageMethod · 0.45

Tested by

no test coverage detected