⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 initedialog.cpp

📁 一个简单的基于Winsocket的网络聊天程序
💻 CPP
字号:
// IniteDialog.cpp : implementation file
//

#include "stdafx.h"
#include "server.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");
	//}}AFX_DATA_INIT
	pAppDialog = (class CServerDlg *)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);
	//}}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);
    CDialog::OnOK();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -