// 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); } }