summaryrefslogtreecommitdiff
path: root/NSCmpts/EncryptSourceProp.h
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2003-09-17 19:07:23 +0000
committerStef Walter <stef@thewalter.net>2003-09-17 19:07:23 +0000
commit3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch)
tree45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /NSCmpts/EncryptSourceProp.h
Initial ImportHEADmaster
Diffstat (limited to 'NSCmpts/EncryptSourceProp.h')
-rw-r--r--NSCmpts/EncryptSourceProp.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/NSCmpts/EncryptSourceProp.h b/NSCmpts/EncryptSourceProp.h
new file mode 100644
index 0000000..0be6b5a
--- /dev/null
+++ b/NSCmpts/EncryptSourceProp.h
@@ -0,0 +1,87 @@
+// EncryptSourceProp.h : Declaration of the CEncryptSourceProp
+
+#ifndef __ENCRYPTSOURCEPROP_H_
+#define __ENCRYPTSOURCEPROP_H_
+
+#include "resource.h" // main symbols
+
+#include "../common/cmptdata.h"
+#include <contexthelp.h>
+
+#include "sourceprop.h"
+
+EXTERN_C const CLSID CLSID_EncryptSourceProp;
+
+/////////////////////////////////////////////////////////////////////////////
+// CEncryptSourceProp
+class ATL_NO_VTABLE CEncryptSourceProp :
+ public CComObjectRootEx<CComSingleThreadModel>,
+ public CComCoClass<CEncryptSourceProp, &CLSID_EncryptSourceProp>,
+ public IPropertyPageImpl<CEncryptSourceProp>,
+
+ // Most of functionality comes from
+ public CSourceProp,
+ public CContextHelp<CEncryptSourceProp>
+{
+
+// Construction
+public:
+ CEncryptSourceProp()
+ {
+ m_dwTitleID = IDS_TITLEEncryptSourceProp;
+ m_dwHelpFileID = IDS_NSHELPFILE;
+ m_dwDocStringID = IDS_DOCSTRINGEncryptSourceProp;
+ }
+
+DECLARE_REGISTRY_RESOURCEID(IDR_ENCRYPTSOURCEPROP)
+
+DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+BEGIN_COM_MAP(CEncryptSourceProp)
+ COM_INTERFACE_ENTRY(IPropertyPage)
+ COM_INTERFACE_ENTRY(IDropTarget)
+END_COM_MAP()
+
+BEGIN_MSG_MAP(CEncryptSourceProp)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ CHAIN_MSG_MAP(CSourceProp)
+ CHAIN_MSG_MAP(IPropertyPageImpl<CEncryptSourceProp>)
+ CHAIN_MSG_MAP(CContextHelp<CEncryptSourceProp>)
+END_MSG_MAP()
+
+BEGIN_HELP_MAP(NS_HELP_FILE)
+ HELP_ID(IDC_SOURCE_LIST, 4013)
+ HELP_ID(IDC_ADD, 4008)
+ HELP_ID(IDC_REMOVE, 4012)
+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_ENCRYPT_REG_FILES, m_aPaths);
+
+ m_bDirty = FALSE;
+ return S_OK;
+ }
+
+protected:
+ CPropertyBag m_Data;
+
+};
+
+#endif //__ENCRYPTSOURCEPROP_H_