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

📄 serverdlg.cpp

📁 用MFC库写的最基本的C/S模型
💻 CPP
字号:
// ServerDlg.cpp : implementation file
//

#include "stdafx.h"
#include "ServerInit.h"
#include "ServerDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// ServerDlg dialog


ServerDlg::ServerDlg(CWnd* pParent /*=NULL*/)
	: CDialog(ServerDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(ServerDlg)
	m_show = _T("");
	m_msg = _T("");
	//}}AFX_DATA_INIT
}


void ServerDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(ServerDlg)
	DDX_Text(pDX, IDC_EDITSHOW, m_show);
	DDV_MaxChars(pDX, m_show, 3000);
	DDX_Text(pDX, IDC_EDIT2, m_msg);
	DDV_MaxChars(pDX, m_msg, 100);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(ServerDlg, CDialog)
	//{{AFX_MSG_MAP(ServerDlg)
	ON_BN_CLICKED(IDC_BUTTONSEND, OnButtonsend)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// ServerDlg message handlers

void ServerDlg::OnButtonsend() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	m_show+="\r\n"+m_msg;
    if(pArOut->IsStoring())
	{
		*pArOut<<m_msg;
	    pArOut->Flush();
		m_msg.Empty();

	}

	
	
	UpdateData(FALSE);
}

⌨️ 快捷键说明

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