summaryrefslogtreecommitdiffabout
path: root/PropsServer.cpp
Side-by-side diff
Diffstat (limited to 'PropsServer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--PropsServer.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/PropsServer.cpp b/PropsServer.cpp
index 6f1e08c..a3948e0 100644
--- a/PropsServer.cpp
+++ b/PropsServer.cpp
@@ -24,4 +24,5 @@ CPropsServer::CPropsServer() : CPropertyPage(CPropsServer::IDD)
m_TFTPSubdirs = FALSE;
m_WRQMode = -1;
+ m_LogFile = _T("");
//}}AFX_DATA_INIT
}
@@ -35,4 +36,5 @@ void CPropsServer::DoDataExchange(CDataExchange* pDX)
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropsServer)
+ DDX_Control(pDX, IDC_LOGFILE_BROWSE, m_LogBrowseCtl);
DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
DDX_Control(pDX, IDC_PROMPTTIMEOUT, m_PromptTimeoutCtl);
@@ -41,4 +43,5 @@ void CPropsServer::DoDataExchange(CDataExchange* pDX)
DDX_Check(pDX, IDC_TFTPSUBDIRS, m_TFTPSubdirs);
DDX_Radio(pDX, IDC_WRQ_TAKEALL, m_WRQMode);
+ DDX_Text(pDX, IDC_LOGFILE, m_LogFile);
//}}AFX_DATA_MAP
if(pDX->m_bSaveAndValidate)
@@ -52,4 +55,5 @@ BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
//{{AFX_MSG_MAP(CPropsServer)
ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
+ ON_BN_CLICKED(IDC_LOGFILE_BROWSE, OnLogfileBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
@@ -64,4 +68,5 @@ BOOL CPropsServer::OnInitDialog()
m_PromptTimeoutCtl.SetRange(5,60);
m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
+ m_LogBrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
return TRUE; // return TRUE unless you set the focus to a control
@@ -78,2 +83,16 @@ CString nr = m_TFTPRoot;
}
}
+
+void CPropsServer::OnLogfileBrowse()
+{
+ UpdateData(TRUE);
+ CFileDialog cfd(
+ FALSE, ".log", (LPCSTR)m_LogFile,
+ OFN_EXPLORER|OFN_HIDEREADONLY|OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ "Log files (*.log)|*.log|All Files (*.*)|*.*||",
+ this);
+ if(cfd.DoModal()==IDOK) {
+ m_LogFile = cfd.GetPathName();
+ UpdateData(FALSE);
+ }
+}