summaryrefslogtreecommitdiff
path: root/NSCmpts/TempWarnDlg.cpp
blob: 702519e94929a6c6720f38fb233ae1ed9bc061c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// 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;
}