diff options
Diffstat (limited to 'win32/droplet/progressdlg.cpp')
-rw-r--r-- | win32/droplet/progressdlg.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/win32/droplet/progressdlg.cpp b/win32/droplet/progressdlg.cpp index 53f5e14..acba362 100644 --- a/win32/droplet/progressdlg.cpp +++ b/win32/droplet/progressdlg.cpp @@ -30,6 +30,7 @@ ProgressDlg::ProgressDlg() m_flip = false; m_hThread = NULL; m_hEvent = NULL; + m_isCancelled = false; InitializeCriticalSection(&m_sec); } @@ -192,9 +193,13 @@ LRESULT ProgressDlg::onInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& // Dialog was closed LRESULT ProgressDlg::onClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { + EnterCriticalSection(&m_sec); + m_isCancelled = true; + LeaveCriticalSection(&m_sec); + // TODO: will this get called by NC area? EndDialog(IDOK); - return 0; + return 1; } // onCancel: ------------------------------------------------------------------ |