📄 proppageusergeneral.cpp
字号:
// PropPageUserGeneral.cpp : implementation file//#include "stdafx.h"#include "warmmcsnapin.h"#include "PropPageUserGeneral.h"#include "WarIfAuthModule.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endif/////////////////////////////////////////////////////////////////////////////// CPropPageUserGeneral property pageIMPLEMENT_DYNCREATE(CPropPageUserGeneral, CPropertyPage)CPropPageUserGeneral::CPropPageUserGeneral(war_if_user_ptr_t& rUserPtr) : CPropertyPage(CPropPageUserGeneral::IDD),mUserPtr(rUserPtr){ //{{AFX_DATA_INIT(CPropPageUserGeneral) m_Info = _T("No information is available"); m_bEnable = mUserPtr->IsEnabled(); //}}AFX_DATA_INIT switch(mUserPtr->GetIfAuth().GetType()) { case WarIfAuthModule::AMT_WINNT: m_Info.LoadString(IDS_WINNT_AUTH_INFO); if (!mUserPtr->IsOriginEnabled()) { CString disabled_msg; disabled_msg.LoadString(IDS_WINNT_AUTH_DISABLED_INFO); m_Info += _T("\r\n"); m_Info += disabled_msg; } break; }}CPropPageUserGeneral::~CPropPageUserGeneral(){}void CPropPageUserGeneral::DoDataExchange(CDataExchange* pDX){ CPropertyPage::DoDataExchange(pDX); //{{AFX_DATA_MAP(CPropPageUserGeneral) DDX_Text(pDX, IDC_INFO, m_Info); DDX_Check(pDX, IDC_ENABLE, m_bEnable); //}}AFX_DATA_MAP}BEGIN_MESSAGE_MAP(CPropPageUserGeneral, CPropertyPage) //{{AFX_MSG_MAP(CPropPageUserGeneral) ON_BN_CLICKED(IDC_ENABLE, OnEnable) //}}AFX_MSG_MAPEND_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////// CPropPageUserGeneral message handlersBOOL CPropPageUserGeneral::OnInitDialog() { CPropertyPage::OnInitDialog(); GetDlgItem(IDC_ENABLE)->EnableWindow(mUserPtr->IsOriginEnabled()); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE}BOOL CPropPageUserGeneral::OnApply() { UpdateData(); mUserPtr->SetEnable(m_bEnable); return CPropertyPage::OnApply();}void CPropPageUserGeneral::OnEnable() { SetModified();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -