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

Method run_dlg_proc

src/ui/ProgressDialog.cpp:38–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38INT_PTR ProgressDialog::run_dlg_proc(UINT message, WPARAM w_param,
39 LPARAM /*lParam*/) {
40 switch (message) {
41 case WM_SHOWWINDOW: {
42 constexpr auto timer_resolution = 100;
43 if (w_param == TRUE) {
44 SetTimer(_hSelf, ui_update_timer_id, timer_resolution, nullptr);
45 } else {
46 KillTimer(_hSelf, ui_update_timer_id);
47 }
48 }
49 case WM_TIMER: {
50 switch (w_param) {
51 case ui_update_timer_id:
52 update();
53 return 0;
54 default:
55 break;
56 }
57 }
58 case WM_INITDIALOG: {
59 m_h_desc_top = GetDlgItem(_hSelf, IDC_DESCTOP);
60 m_h_desc_bottom = GetDlgItem(_hSelf, IDC_DESCBOTTOM);
61 m_h_progress_bar = GetDlgItem(_hSelf, IDC_PROGRESSBAR);
62 SendMessage(m_h_progress_bar, PBM_SETRANGE, 0,
63 static_cast<LPARAM>(MAKELONG(0, 100)));
64 return TRUE;
65 }
66 case WM_COMMAND:
67 switch (LOWORD(w_param)) {
68 case IDC_STOP:
69 if (HIWORD(w_param) == BN_CLICKED) {
70 m_download_dics_dlg.set_cancel_pressed(true);
71 }
72 break;
73 };
74 break;
75 };
76 return FALSE;
77}
78
79void ProgressDialog::set_marquee(bool animated) {
80 if (m_marquee == animated)

Callers

nothing calls this directly

Calls 2

updateFunction · 0.85
set_cancel_pressedMethod · 0.80

Tested by

no test coverage detected