📄 initedialog.cpp
字号:
// IniteDialog.cpp : implementation file
//
#include "stdafx.h"
#include "client.h"
#include "IniteDialog.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CIniteDialog dialog
CIniteDialog::CIniteDialog(CWnd * pParent /*=NULL*/)
: CDialog(CIniteDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(CIniteDialog)
m_strName = _T("小布什");
m_strPort = _T("8888");
m_strIP = _T("192.168.1.155");
//}}AFX_DATA_INIT
pAppDialog =(class CClientDlg *) pParent;
}
void CIniteDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CIniteDialog)
DDX_Text(pDX, IDC_NAME, m_strName);
DDX_Text(pDX, IDC_PORT, m_strPort);
DDX_Text(pDX, IDC_IP, m_strIP);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CIniteDialog, CDialog)
//{{AFX_MSG_MAP(CIniteDialog)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CIniteDialog message handlers
void CIniteDialog::OnOK()
{
// TODO: Add extra validation here
UpdateData(true);
pAppDialog->m_strName=m_strName;
pAppDialog->m_iPort=atoi(m_strPort);
pAppDialog->m_strIP=m_strIP;
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -