📄 pcadddlg.cpp
字号:
// PcAddDlg.cpp : implementation file
//
#include "stdafx.h"
#include "../resource.h"
#include "PcAddDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPcAddDlg dialog
CPcAddDlg::CPcAddDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPcAddDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPcAddDlg)
m_port = 8101;
m_strName = _T("");
//}}AFX_DATA_INIT
}
void CPcAddDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPcAddDlg)
DDX_Control(pDX, IDC_IPADDRESS1, m_ipAddr);
DDX_Text(pDX, IDC_EDIT1, m_port);
DDX_Text(pDX, IDC_EDIT2, m_strName);
//}}AFX_DATA_MAP
m_ipAddr.SetAddress(192,168,0,1) ;
}
BEGIN_MESSAGE_MAP(CPcAddDlg, CDialog)
//{{AFX_MSG_MAP(CPcAddDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPcAddDlg message handlers
BOOL CPcAddDlg::Create(CWnd* pParentWnd)
{
// TODO: Add your specialized code here and/or call the base class
return CDialog::Create(IDD, pParentWnd);
}
void CPcAddDlg::OnOK()
{
// TODO: Add extra validation here
m_ipAddr.GetAddress(ip) ;
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -