// TempWarnDlg.cpp : Implementation of CTempWarnDlg #include "stdafx.h" #include "TempWarnDlg.h" ///////////////////////////////////////////////////////////////////////////// // CTempWarnDlg CTempWarnDlg::CTempWarnDlg(const string& sFolderName) : CDialogImplEx(IDD) { m_sFolderName = sFolderName; m_bNotAgain = false; } CTempWarnDlg::~CTempWarnDlg() { } LRESULT CTempWarnDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { string sTemp; sTemp.format(IDS_EMPTYTEMP_WARN, (LPCTSTR)m_sFolderName); SetDlgItemText(IDC_FOLDERWARN, sTemp); CheckDlgButton(IDC_DONTSHOW, m_bNotAgain); return 1; // Let the system set the focus } LRESULT CTempWarnDlg::OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { m_bNotAgain = IsDlgButtonChecked(IDC_DONTSHOW) ? true : false; EndDialog(wID); return 0; } LRESULT CTempWarnDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled) { m_bNotAgain = IsDlgButtonChecked(IDC_DONTSHOW) ? true : false; EndDialog(wID); return 0; }