else if(userResponse == IDCANCEL)\r
{\r
//User pressed 'Push' button after successful commit.\r
- m_bPushAfterCommit=true;\r
+ if(progress.m_bAltAbortPress)\r
+ m_bPushAfterCommit=true;\r
}\r
\r
CFile::Remove(tempfile);\r
: CResizableStandAloneDialog(CProgressDlg::IDD, pParent), m_bShowCommand(true), m_bAutoCloseOnSuccess(false), m_bAbort(false), m_bDone(false)\r
{\r
m_pThread = NULL;\r
+ m_bAltAbortPress=false;\r
}\r
\r
CProgressDlg::~CProgressDlg()\r
BEGIN_MESSAGE_MAP(CProgressDlg, CResizableStandAloneDialog)\r
ON_MESSAGE(MSG_PROGRESSDLG_UPDATE_UI, OnProgressUpdateUI)\r
ON_BN_CLICKED(IDOK, &CProgressDlg::OnBnClickedOk)\r
+ ON_BN_CLICKED(IDCANCEL,&CProgressDlg::OnBnClickedCancel)\r
END_MESSAGE_MAP()\r
\r
BOOL CProgressDlg::OnInitDialog()\r
OnOK();\r
}\r
\r
+void CProgressDlg::OnBnClickedCancel()\r
+{\r
+ if(!this->m_changeAbortButtonOnSuccessTo.IsEmpty())\r
+ {\r
+ CString text;\r
+ GetDlgItem(IDCANCEL)->GetWindowText(text);\r
+ if(m_changeAbortButtonOnSuccessTo == text)\r
+ {\r
+ m_bAltAbortPress=true;\r
+ }\r
+ \r
+ }\r
+ \r
+ OnCancel();\r
+ \r
+}\r
void CProgressDlg::OnCancel()\r
{\r
if(m_bDone)\r
\r
bool m_bAbort;\r
bool m_bDone;\r
+ bool m_bAltAbortPress;\r
protected:\r
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support\r
static UINT ProgressThreadEntry(LPVOID pVoid);\r
DECLARE_MESSAGE_MAP()\r
public:\r
afx_msg void OnBnClickedOk();\r
+ afx_msg void OnBnClickedCancel();\r
};\r