// BackupSourceProp.h : Declaration of the CBackupSourceProp #ifndef __BACKUPSOURCEPROP_H_ #define __BACKUPSOURCEPROP_H_ #include "resource.h" // main symbols #include "../common/cmptdata.h" #include #include "sourceprop.h" EXTERN_C const CLSID CLSID_BackupSourceProp; ///////////////////////////////////////////////////////////////////////////// // CBackupSourceProp class ATL_NO_VTABLE CBackupSourceProp : public CComObjectRootEx, public CComCoClass, public IPropertyPageImpl, // Get's most of functionality from here public CSourceProp, public CContextHelp { // Construction public: CBackupSourceProp() { m_dwTitleID = IDS_TITLEBackupSourceProp; m_dwHelpFileID = IDS_NSHELPFILE; m_dwDocStringID = IDS_DOCSTRINGBackupSourceProp; } ~CBackupSourceProp() { ATLTRACE(_T("Destroying BackupSourceProp\n")); } DECLARE_REGISTRY_RESOURCEID(IDR_BACKUPSOURCEPROP) DECLARE_PROTECT_FINAL_CONSTRUCT() BEGIN_COM_MAP(CBackupSourceProp) COM_INTERFACE_ENTRY(IPropertyPage) COM_INTERFACE_ENTRY(IDropTarget) END_COM_MAP() BEGIN_MSG_MAP(CBackupSourceProp) MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) CHAIN_MSG_MAP(CSourceProp) CHAIN_MSG_MAP(IPropertyPageImpl) CHAIN_MSG_MAP(CContextHelp) END_MSG_MAP() BEGIN_HELP_MAP(NS_HELP_FILE) HELP_ID(IDC_SOURCE_LIST, 4007) HELP_ID(IDC_ADD, 4001) HELP_ID(IDC_REMOVE, 4006) END_HELP_MAP // Handler prototypes: // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); STDMETHOD(Apply)(void) { ATLTRACE(_T("CBackupSourceProp::Apply\n")); m_Data.Initialize(m_nObjects, m_ppUnk); if(!m_Data.IsInitialized()) return E_FAIL; UpdateData(true); m_Data.WriteStringSet(NS_BACKUP_REG_SOURCE, m_aPaths); m_bDirty = FALSE; return S_OK; } protected: CPropertyBag m_Data; }; #endif //__BACKUPSOURCEPROP_H_