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

📄 peepersetdlg.cpp

📁 这是个soket的代码不是太实用但是对出学者还是有些帮助的 有需要的可以
💻 CPP
字号:
#include "stdafx.h"
#include "peeperclient.h"
#include "PeeperSetDlg.h"
#include "../peeperlib.h"

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

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

void CPeeperSetDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPeeperSetDlg)
	//}}AFX_DATA_MAP
}


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

void CPeeperSetDlg::OnOK() 
{
	GetDlgItemText(IDC_EDIT_IP, m_strIP);
	m_uPort = GetDlgItemInt(IDC_EDIT_PORT);
	m_nBits = GetDlgItemInt(IDC_EDIT_BITS);
	m_nSpeed = GetDlgItemInt(IDC_EDIT_SPEED);
	
	CDialog::OnOK();
}

BOOL CPeeperSetDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	SetDlgItemText(IDC_EDIT_IP, _T("127.0.0.1"));
	SetDlgItemInt(IDC_EDIT_PORT, PL_PEEPER_PORT);
	SetDlgItemText(IDC_EDIT_BITS, _T("4"));
	SetDlgItemInt(IDC_EDIT_SPEED, 1000);

	((CEdit *)GetDlgItem(IDC_EDIT_SPEED))->SetLimitText(6);
	((CEdit *)GetDlgItem(IDC_EDIT_BITS))->SetLimitText(2);
	
	return TRUE;
}

⌨️ 快捷键说明

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