From 3f95d417d9e623ac0c74df8ef11d7a01846392dd Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Sep 2003 19:07:23 +0000 Subject: Initial Import --- NSCmpts/BackupAdvancedProp.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 NSCmpts/BackupAdvancedProp.cpp (limited to 'NSCmpts/BackupAdvancedProp.cpp') 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); + } +} -- cgit v1.2.3