summaryrefslogtreecommitdiff
path: root/NSCmpts/BackupAdvancedProp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'NSCmpts/BackupAdvancedProp.cpp')
-rw-r--r--NSCmpts/BackupAdvancedProp.cpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/NSCmpts/BackupAdvancedProp.cpp b/NSCmpts/BackupAdvancedProp.cpp
new file mode 100644
index 0000000..d1c03d9
--- /dev/null
+++ b/NSCmpts/BackupAdvancedProp.cpp
@@ -0,0 +1,56 @@
+// BackupAdvancedProp.cpp : Implementation of CBackupAdvancedProp
+#include "stdafx.h"
+#include "NSCmpts.h"
+#include "BackupAdvancedProp.h"
+
+/////////////////////////////////////////////////////////////////////////////
+// CBackupAdvancedProp Property Sheet Stuff
+
+LRESULT CBackupAdvancedProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+ // Let it choose an object to get data from
+ m_Data.Initialize(m_nObjects, m_ppUnk);
+
+ // Set this for CIgnoreProp
+ m_hwndIgnore = m_hWnd;
+
+ // Let the Ignore stuff initialize
+ CIgnoreProp::OnInitDialog(uMsg, wParam, lParam, bHandled);
+
+ // Setup the Combo box
+ m_sEngineType = m_Data.GetString(NS_BACKUP_REG_ENGINE, _T("Archive"));
+
+ m_ctlEngine = GetDlgItem(IDC_ENGINE_TYPE);
+ m_ctlEngine.AddString(_T("Archive"));
+ m_ctlEngine.AddString(_T("Date"));
+
+ UpdateData(false);
+
+ bHandled = true;
+ return TRUE;
+}
+
+LRESULT CBackupAdvancedProp::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+ // Just in case, before going out
+ UpdateData(true);
+ return 0;
+}
+
+void CBackupAdvancedProp::UpdateData(bool bSave)
+{
+ // Let it save/load first
+ CIgnoreProp::UpdateData(bSave);
+
+ if(bSave)
+ {
+ // Get Selected Text
+ int nSel = m_ctlEngine.GetCurSel();
+ m_ctlEngine.GetLBText(nSel, m_sEngineType.get_buffer(m_ctlEngine.GetLBTextLen(nSel)));
+ }
+ else
+ {
+ // Just Select the Appropriate One
+ m_ctlEngine.SelectString(-1, m_sEngineType);
+ }
+}