portdlg.cpp

来自「Visual_C++.NET精彩案例237.rar」· C++ 代码 · 共 60 行

CPP
60
字号
// PortDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ChatServer.h"
#include "PortDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPortDlg dialog


CPortDlg::CPortDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CPortDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CPortDlg)
	//}}AFX_DATA_INIT
}


void CPortDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPortDlg)
	DDX_Control(pDX, IDC_SPIN_CHANNEL, m_SpinPort);
	DDX_Text(pDX, IDC_EDIT_CHANNEL, m_nPort);
	DDV_MinMaxInt(pDX, m_nPort, 8000, 9000);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CPortDlg message handlers

BOOL CPortDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//设置默认的端口号
	m_nPort = 8000;
	//设置微调按钮的范围
	m_SpinPort.SetRange(8000,9000);
	//更新窗体
	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 + =
减小字号Ctrl + -
显示快捷键?