?? setupdlg.cpp
字號:
// SetupDlg.cpp : implementation file
//
#include "stdafx.h"
#include "ChatClient.h"
#include "SetupDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSetupDlg dialog
CSetupDlg::CSetupDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSetupDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSetupDlg)
//}}AFX_DATA_INIT
}
void CSetupDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSetupDlg)
DDX_Control(pDX, IDC_SPIN_PORT, m_SpinPort);
DDX_Text(pDX, IDC_EDIT_PORT, m_nPort);
DDV_MinMaxInt(pDX, m_nPort, 8000, 9000);
DDX_Text(pDX, IDC_EDIT_SERVER, m_strServer);
DDX_Text(pDX, IDC_EDIT_HANDLE, m_strHandle);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSetupDlg, CDialog)
//{{AFX_MSG_MAP(CSetupDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSetupDlg message handlers
BOOL CSetupDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
//設(shè)置默認(rèn)的通信端口號
m_nPort = 8000;
//設(shè)置默認(rèn)的服務(wù)器地址
m_strServer = "localhost";
//設(shè)置默認(rèn)的客戶機(jī)名稱
m_strHandle = "client1";
//設(shè)置可用的通信端口號的范圍
m_SpinPort.SetRange(8000,9000);
//更新設(shè)置
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -