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

📄 getin.cpp

📁 一个局域网的斗地主游戏
💻 CPP
字号:
// Getin.cpp : implementation file
//

#include "stdafx.h"
#include "Program.h"
#include "Getin.h"
#include "MainFrm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CGetin dialog


CGetin::CGetin(CWnd* pParent /*=NULL*/)
	: CDialog(CGetin::IDD, pParent)
{
	//{{AFX_DATA_INIT(CGetin)
	m_ip = _T("127.0.0.1");
	m_Port = _T("100");
	//}}AFX_DATA_INIT
}


void CGetin::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CGetin)
	DDX_Text(pDX, IDC_IP, m_ip);
	DDX_Text(pDX, IDC_PORT, m_Port);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CGetin, CDialog)
	//{{AFX_MSG_MAP(CGetin)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGetin message handlers

void CGetin::OnOK() 
{
	CMainFrame *m_pMF=(CMainFrame *)AfxGetApp()->m_pMainWnd;
	UINT k;
	k=atoi(m_Port);
	if(k<1 || k>60000)
	{
		MessageBox("输入端口无效,采用默认端口","错误");
		m_Port="100";
	}
	CDialog::OnOK();
}

⌨️ 快捷键说明

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