* given, the application name will be used as the title of the dialog.
*/
CMessageBoxDialog::CMessageBoxDialog ( CWnd* pParent, CString strMessage,
- CString strTitle, UINT nStyle, UINT nHelp )
+ CString strTitle, UINT nStyle, UINT nHelp, const CString& strRegistryKey )
: CDialog ( CMessageBoxDialog::IDD, pParent )
, m_strMessage(strMessage)
, m_strTitle(strTitle.IsEmpty() ? AfxGetAppName() : strTitle)
, m_nTimeoutSeconds(0)
, m_bTimeoutDisabled(false)
, m_nTimeoutTimer(0)
- , m_strRegistryKey(_T(""))
+ , m_strRegistryKey(strRegistryKey)
, m_nDefaultButton(IDC_STATIC)
, m_nEscapeButton(IDC_STATIC)
, m_sDialogUnit(CSize(0, 0))
* application name will be used as the title of the dialog.
*/
CMessageBoxDialog::CMessageBoxDialog ( CWnd* pParent, UINT nMessageID,
- UINT nTitleID, UINT nStyle, UINT nHelp )
+ UINT nTitleID, UINT nStyle, UINT nHelp, const CString& strRegistryKey )
: CMessageBoxDialog(pParent,
LoadResString(nMessageID).c_str(),
nTitleID == 0 ? AfxGetAppName() : LoadResString(nTitleID).c_str(),
- nStyle, nHelp )
+ nStyle, nHelp, strRegistryKey )
{
}
// Constructor of the class for direct providing of the message strings.
CMessageBoxDialog ( CWnd* pParent, CString strMessage,
- CString strTitle = _T(""), UINT nStyle = MB_OK, UINT nHelp = 0 );
+ CString strTitle = _T(""), UINT nStyle = MB_OK, UINT nHelp = 0, const CString& strRegistryKey = _T("") );
// Constructor of the class for loading the strings from the resources.
CMessageBoxDialog ( CWnd* pParent, UINT nMessageID, UINT nTitleID = 0,
- UINT nStyle = MB_OK, UINT nHelp = 0 );
+ UINT nStyle = MB_OK, UINT nHelp = 0, const CString& strRegistryKey = _T("") );
// Default destructor of the class.
virtual ~CMessageBoxDialog ( );
}
}
}
- int ans = AfxMessageBox(msg.c_str(), MB_YESNOCANCEL | MB_ICONQUESTION | MB_DONT_ASK_AGAIN);
+ CMessageBoxDialog dlg(
+ m_pDirView ? m_pDirView->GetParentFrame() : nullptr,
+ msg.c_str(), _T(""),
+ MB_YESNOCANCEL | MB_ICONQUESTION | MB_DONT_ASK_AGAIN, 0U,
+ _T("CompareLargeFiles"));
+ int ans = dlg.DoModal();
if (ans == IDCANCEL)
return true;
else if (ans == IDNO)