diff options
author | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2003-09-17 19:07:23 +0000 |
commit | 3f95d417d9e623ac0c74df8ef11d7a01846392dd (patch) | |
tree | 45ec73f2dc07eafd7f41a6f62a8cdfbaa279469f /NSCmpts/EncryptAdvancedProp.cpp |
Diffstat (limited to 'NSCmpts/EncryptAdvancedProp.cpp')
-rw-r--r-- | NSCmpts/EncryptAdvancedProp.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/NSCmpts/EncryptAdvancedProp.cpp b/NSCmpts/EncryptAdvancedProp.cpp new file mode 100644 index 0000000..2149139 --- /dev/null +++ b/NSCmpts/EncryptAdvancedProp.cpp @@ -0,0 +1,51 @@ +// EncryptAdvancedProp.cpp : Implementation of CEncryptAdvancedProp +#include "stdafx.h" +#include "NSCmpts.h" +#include "EncryptAdvancedProp.h" + +///////////////////////////////////////////////////////////////////////////// +// CEncryptAdvancedProp + +LRESULT CEncryptAdvancedProp::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Let it choose an object for data + m_Data.Initialize(m_nObjects, m_ppUnk); + + // Set this for CIgnoreProp + m_hwndIgnore = m_hWnd; + + CIgnoreProp::OnInitDialog(uMsg, wParam, lParam, bHandled); + + // Other Data Init + m_bDisablePassword = m_Data.GetInt(NS_ENCRYPT_REG_DISABLE, true) ? true : false; + m_bEncryptReadOnly = m_Data.GetInt(NS_ENCRYPT_REG_READONLY, false) ? true : false; + + UpdateData(false); + + bHandled = true; + return TRUE; +} + +LRESULT CEncryptAdvancedProp::OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) +{ + // Just in case, save before destroy + UpdateData(true); + return 0; +} + +void CEncryptAdvancedProp::UpdateData(bool bSave) +{ + // Do Ignore Extensions first + CIgnoreProp::UpdateData(bSave); + + if(bSave) + { + m_bDisablePassword = IsDlgButtonChecked(IDC_DISABLEPASSWORD) ? true : false; + m_bEncryptReadOnly = IsDlgButtonChecked(IDC_ENCRYPTREADONLY) ? true : false; + } + else + { + CheckDlgButton(IDC_DISABLEPASSWORD, m_bDisablePassword ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(IDC_ENCRYPTREADONLY, m_bEncryptReadOnly ? BST_CHECKED : BST_UNCHECKED); + } +} |