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

📄 serversettingsethdlg.cpp

📁 mod_RSsim
💻 CPP
字号:
// ServerSettingsEthDlg.cpp : implementation file
//

#include "stdafx.h"
#include "mod_RSsim.h"
#include "ServerSettingsEthDlg.h"
#include "mod_RSsimDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

extern CMOD_simDlg * pGlobalDialog;


/////////////////////////////////////////////////////////////////////////////
// CServerSettingsEthDlg dialog


CServerSettingsEthDlg::CServerSettingsEthDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CServerSettingsEthDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CServerSettingsEthDlg)
	m_localPort = 0;		// these get changed by the caller
   m_localId   = 0;
	m_responseDelay = 0;
	m_linger = FALSE;
	m_numServers = 0;
	m_localIPStr = _T("");
	m_remoteIPStr = _T("");
	m_other = 0;
	//}}AFX_DATA_INIT
}


void CServerSettingsEthDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CServerSettingsEthDlg)
	DDX_Text(pDX, IDC_LOCALPORT, m_localPort);
	DDV_MinMaxUInt(pDX, m_localPort, 0, 9999);
   DDX_Text(pDX, IDC_LOCALID, m_localId);
	DDV_MinMaxUInt(pDX, m_localId, 0, 9999);
	DDX_Text(pDX, IDC_RESPONSEDELAY, m_responseDelay);
	DDV_MinMaxUInt(pDX, m_responseDelay, 0, 10000);
	DDX_Check(pDX, IDC_LINGER, m_linger);
	DDX_Text(pDX, IDC_NUMSERVERS, m_numServers);
	DDV_MinMaxUInt(pDX, m_numServers, 1, 1000);
	DDX_Text(pDX, IDC_LOCALIP, m_localIPStr);
	DDX_Text(pDX, IDC_REMOTEIP, m_remoteIPStr);
	DDX_Text(pDX, IDC_LOCALPORT2, m_other);
	DDV_MinMaxDWord(pDX, m_other, 0, 65535);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CServerSettingsEthDlg message handlers

void CServerSettingsEthDlg::OnOK() 
{
	// TODO: Add extra validation here
	
	CDialog::OnOK();
}

// ----------------------------- OnInitDialog -------------------------------
BOOL CServerSettingsEthDlg::OnInitDialog() 
{
CString format;
CString result;

	CDialog::OnInitDialog();
	
   m_topic.SetHelpTopic("Ethernet Setup");
	// TODO: Add extra initialization here
   GetDlgItemText(IDC_SERVERLINE, format);

   result.Format(format, pGlobalDialog->m_pServerSockArray->GetUpperBound()+1);
   SetDlgItemText(IDC_SERVERLINE, result);

	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 + -