📄 propertypage_ip.cpp
字号:
// PropertyPage_IP.cpp : implementation file
//
#include "stdafx.h"
#include "rmtool.h"
#include "Propertys.h"
#include "PropertyPage_IP.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropertyPage_IP property page
IMPLEMENT_DYNCREATE(CPropertyPage_IP, CPropertyPage)
CPropertyPage_IP::CPropertyPage_IP() : CPropertyPage(CPropertyPage_IP::IDD)
{
//{{AFX_DATA_INIT(CPropertyPage_IP)
m_ServerName = _T("");
m_szPagename = _T("");
//}}AFX_DATA_INIT
m_bLastDia = false;
}
CPropertyPage_IP::~CPropertyPage_IP()
{
}
void CPropertyPage_IP::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropertyPage_IP)
DDX_Control(pDX, IDC_IPADDRESS1, c_IpAddress);
DDX_Text(pDX, IDC_EDIT_SERVERNAME, m_ServerName);
DDX_Text(pDX, IDC_PAGENAME, m_szPagename);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropertyPage_IP, CPropertyPage)
//{{AFX_MSG_MAP(CPropertyPage_IP)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropertyPage_IP message handlers
BOOL CPropertyPage_IP::OnWizardFinish()
{
// TODO: Add your specialized code here and/or call the base class
//犬牢 皋矫瘤唱坷绊... setup.ini拳老俊 历厘茄促.
SaveData();
return CPropertyPage::OnWizardFinish();
}
LRESULT CPropertyPage_IP::OnWizardBack()
{
// TODO: Add your specialized code here and/or call the base class
((CPropertys*)GetParent())->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT );
return CPropertyPage::OnWizardBack();
}
LRESULT CPropertyPage_IP::OnWizardNext()
{
// TODO: Add your specialized code here and/or call the base class
//磊丰蔼苞 锅龋甫 焊辰促.
SaveData();
return CPropertyPage::OnWizardNext();
}
void CPropertyPage_IP::SaveData()
{
UpdateData(TRUE); //Get in Field
BYTE nField1, nField2, nField3, nField4;
c_IpAddress.GetAddress( nField1, nField2, nField3, nField4 ); //郴啊 传揪备 摹磊官滴 GetAddress甫 救厚林匙..
CString szTmp;szTmp.Format( "%d.%d.%d.%d",nField1, nField2, nField3, nField4 );
((CPropertys*)GetParent())->m_Page1.IP_Name[ m_iPageNum ].szAddressName = m_ServerName;
((CPropertys*)GetParent())->m_Page1.IP_Name[ m_iPageNum ].szIPAddress = szTmp;
}
BOOL CPropertyPage_IP::OnInitDialog()
{
CPropertyPage::OnInitDialog();
if(m_bLastDia)
((CPropertys*)GetParent())->SetWizardButtons ( PSWIZB_BACK | PSWIZB_FINISH);
else
((CPropertys*)GetParent())->SetWizardButtons( PSWIZB_NEXT | PSWIZB_BACK );
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -