MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / dlgProc

Method dlgProc

src/ui/StaticDialog.cpp:118–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118INT_PTR StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
119 switch (message) {
120 case WM_INITDIALOG: {
121 StaticDialog *pStaticDlg = (StaticDialog *)(lParam);
122 pStaticDlg->_hSelf = hwnd;
123 ::SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
124 ::GetWindowRect(hwnd, &(pStaticDlg->_rc));
125 pStaticDlg->run_dlg_proc(message, wParam, lParam);
126
127 return TRUE;
128 }
129
130 default: {
131 StaticDialog *pStaticDlg = reinterpret_cast<StaticDialog *>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
132 if (!pStaticDlg)
133 return FALSE;
134 for (auto &weak_control : pStaticDlg->m_controls) {
135 if (auto control = weak_control.lock()) {
136 switch (control->dlg_proc(message, wParam, lParam)) {
137 case DlgProcResult::processed:
138 return TRUE;
139 case DlgProcResult::pass_through:
140 break;
141 }
142 }
143 }
144 return pStaticDlg->run_dlg_proc(message, wParam, lParam);
145 }
146 }
147}
148
149void StaticDialog::alignWith(HWND handle, HWND handle2Align, PosAlign pos, POINT &point) {
150 RECT rc, rc2;

Callers

nothing calls this directly

Calls 2

dlg_procMethod · 0.80
run_dlg_procMethod · 0.45

Tested by

no test coverage detected