diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-06-14 11:46:49 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-06-14 11:46:49 +0000 |
commit | 5e54283e7ab71e94e7df98253a00c53c6d470e77 (patch) | |
tree | cf4c3f3b424dcf865b12a48bb745fcfdf361634d /src/core/miranda.cpp | |
parent | 986c890a4362d01a9fd3fb102723b7125546302a (diff) |
Fixed Cancel button on Restarting dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@4930 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/miranda.cpp')
-rw-r--r-- | src/core/miranda.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/miranda.cpp b/src/core/miranda.cpp index 4af88f95a6..20d841f528 100644 --- a/src/core/miranda.cpp +++ b/src/core/miranda.cpp @@ -187,25 +187,27 @@ static INT_PTR CALLBACK WaitForProcessDlgProc(HWND hwnd, UINT msg, WPARAM wParam break;
case WM_COMMAND:
- if ( HIWORD(wParam) == IDCANCEL) {
+ if ( LOWORD(wParam) == IDCANCEL) {
SendDlgItemMessage(hwnd, IDC_PROGRESSBAR, PBM_SETPOS, MIRANDA_PROCESS_WAIT_STEPS, 0);
- EndDialog(hwnd, 0);
+ EndDialog(hwnd, 1);
}
break;
}
return FALSE;
}
-void CheckRestart()
+int CheckRestart()
{
+ int result = 0;
LPCTSTR tszPID = CmdLine_GetOption( _T("restart"));
if (tszPID) {
HANDLE hProcess = OpenProcess(SYNCHRONIZE, FALSE, _ttol(tszPID));
if (hProcess) {
- DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_WAITRESTART), NULL, WaitForProcessDlgProc, (LPARAM)hProcess);
+ result = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_WAITRESTART), NULL, WaitForProcessDlgProc, (LPARAM)hProcess);
CloseHandle(hProcess);
}
}
+ return result;
}
static void crtErrorHandler(const wchar_t*, const wchar_t*, const wchar_t*, unsigned, uintptr_t)
|