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

📄 socketdialog.cpp

📁 The application wizard has created this SoccerDoctor application for you. This application not onl
💻 CPP
字号:
// SocketDialog.cpp : implementation file
//

#include "stdafx.h"
#include "SoccerDoctor.h"
#include "SocketDialog.h"


// CSocketDialog dialog

IMPLEMENT_DYNAMIC(CSocketDialog, CDialog)
CSocketDialog::CSocketDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CSocketDialog::IDD, pParent)
{
}

CSocketDialog::~CSocketDialog()
{
	theApp.WriteProfileString("USTCWrightEagle","SoccerDoctorServerHost",_ServerHost);
	theApp.WriteProfileInt("USTCWrightEagle","SoccerDoctorServerPort",_ServerPort);
}

void CSocketDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_SERVERPORT, _ServerPort);
	DDX_Text(pDX, IDC_SEVERHOST, _ServerHost);
}


BEGIN_MESSAGE_MAP(CSocketDialog, CDialog)
END_MESSAGE_MAP()


// 获得服务器的地址

CString CSocketDialog::getServerHost(void)
{
	return _ServerHost;
}

// 获得服务器端口号
short CSocketDialog::getServerPort(void)
{
	return _ServerPort;
}

BOOL CSocketDialog::OnInitDialog()
{
	CDialog::OnInitDialog();

	// TODO:  Add extra initialization here
	_ServerHost = theApp.GetProfileString("USTCWrightEagle","SoccerDoctorServerHost","localhost") ;
	_ServerPort = theApp.GetProfileInt("USTCWrightEagle","SoccerDoctorServerPort",6000) ;
	UpdateData(FALSE);
	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 + -