欢迎来到天天文库
浏览记录
ID:48607440
大小:75.50 KB
页数:20页
时间:2020-01-29
《聊天软件代码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、I服务器://ServerDlg.cpp:implementationfile//#include"stdafx.h"#include"Server.h"#include"ServerDlg.h"#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=__FILE__;#endif///////////////////////////////////////////////////////////////////////////////CAboutDlgdialogusedforAppA
2、boutclassCAboutDlg:publicCDialog{public:CAboutDlg();protected:DECLARE_MESSAGE_MAP()};CAboutDlg::CAboutDlg():CDialog(CAboutDlg::IDD){}voidCAboutDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExchange(pDX);}BEGIN_MESSAGE_MAP(CAboutDlg,CDialog)END_MESSAGE_MAP()/////////////////////
3、//////////////////////////////////////////////////////////CServerDlgdialogCServerDlg::CServerDlg(CWnd*pParent/*=NULL*/):CDialog(CServerDlg::IDD,pParent){m_hIcon=AfxGetApp()->LoadIcon(IDI_ICONAPP);}voidCServerDlg::DoDataExchange(CDataExchange*pDX){CDialog::DoDataExchange(pDX);DDX_Contro
4、l(pDX,IDC_LIST_USER,m_lbUser);DDX_Text(pDX,IDC_EDIT_DISPLAY,m_strDisplay);}BEGIN_MESSAGE_MAP(CServerDlg,CDialog)ON_WM_SYSCOMMAND()ON_WM_PAINT()ON_WM_QUERYDRAGICON()ON_BN_CLICKED(IDC_BN_START,OnBnStart)ON_BN_CLICKED(IDC_BN_CLOSE,OnBnClose)ON_MESSAGE(WM_RECEIVE,OnReceive)ON_MESSAGE(WM_CL
5、IENTCLOSE,OnClientClose)ON_MESSAGE(WM_ACCEPT,OnAccept)ON_WM_DESTROY()END_MESSAGE_MAP()///////////////////////////////////////////////////////////////////////////////CServerDlgmessagehandlersBOOLCServerDlg::OnInitDialog(){CDialog::OnInitDialog();ASSERT((IDM_ABOUTBOX&0xFFF0)==IDM_ABOUTBO
6、X);ASSERT(IDM_ABOUTBOX<0xF000);CMenu*pSysMenu=GetSystemMenu(FALSE);if(pSysMenu!=NULL){CStringstrAboutMenu;strAboutMenu.LoadString(IDS_ABOUTBOX);if(!strAboutMenu.IsEmpty()){pSysMenu->AppendMenu(MF_SEPARATOR);pSysMenu->AppendMenu(MF_STRING,IDM_ABOUTBOX,strAboutMenu);}}SetIcon(m_hIcon,TRU
7、E);//SetbigiconSetIcon(m_hIcon,FALSE);//Setsmalliconm_iNetPort=3127;m_Server.Initialize(this);m_bServer=FALSE;GetDlgItem(IDC_BN_CLOSE)->EnableWindow(FALSE);returnTRUE;//returnTRUEunlessyousetthefocustoacontrol}voidCServerDlg::OnSysCommand(UINTnID,LPARAMlParam){if((nID&0xFFF0)==IDM_AB
此文档下载收益归作者所有