MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / dlgProc

Method dlgProc

pluginManager/src/ProgressDialog.cpp:64–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64INT_PTR CALLBACK ProgressDialog::dlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
65{
66 switch(message)
67 {
68 case WM_INITDIALOG:
69 {
70 ::SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam);
71 ProgressDialog* dlg = reinterpret_cast<ProgressDialog*>(lParam);
72 return dlg->runDlgProc(hWnd, message, wParam, lParam);
73 }
74
75 case WM_COMMAND:
76 {
77 if (IDCANCEL == wParam) {
78 int mbResult = MessageBox(hWnd, _T("Are you sure you wish to abort the current installation/removal?"), _T("Cancel installation / removal?"), MB_YESNO | MB_ICONQUESTION);
79 if (IDYES == mbResult) {
80 ProgressDialog* dlg = reinterpret_cast<ProgressDialog*>(::GetWindowLongPtr(hWnd, GWLP_USERDATA));
81 dlg->_cancelToken.triggerCancel();
82 }
83 }
84 return FALSE;
85 }
86 default:
87 {
88 ProgressDialog* dlg = reinterpret_cast<ProgressDialog*>(::GetWindowLongPtr(hWnd, GWLP_USERDATA));
89 return dlg->runDlgProc(hWnd, message, wParam, lParam);
90 }
91 }
92
93}
94
95void ProgressDialog::goToCenter()
96{

Callers

nothing calls this directly

Calls 2

triggerCancelMethod · 0.80
runDlgProcMethod · 0.45

Tested by

no test coverage detected