欢迎来到天天文库
浏览记录
ID:37918777
大小:58.00 KB
页数:9页
时间:2019-06-02
《CSocket客户服务连接程序讲解代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、一,客户端程序://CClientView.cpp:implementationoftheCCClientViewclass//#include"stdafx.h"#include"CClient.h"#include"CClientDoc.h"#include"CClientView.h"#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=__FILE__;#endif/////////////////////////////////////////////////////
2、//////////////////////////CCClientViewIMPLEMENT_DYNCREATE(CCClientView,CEditView)BEGIN_MESSAGE_MAP(CCClientView,CEditView)//{{AFX_MSG_MAP(CCClientView)ON_COMMAND(ID_BUTTON_CLOSE,OnButtonClose)ON_COMMAND(ID_BUTTON_CONNECT,OnButtonConnect)ON_COMMAND(ID_BUTTON_SEND,OnButtonSend)ON_UPD
3、ATE_COMMAND_UI(ID_BUTTON_CLOSE,OnUpdateButtonClose)ON_UPDATE_COMMAND_UI(ID_BUTTON_CONNECT,OnUpdateButtonConnect)ON_UPDATE_COMMAND_UI(ID_BUTTON_SEND,OnUpdateButtonSend)//}}AFX_MSG_MAP//StandardprintingcommandsON_COMMAND(ID_FILE_PRINT,CEditView::OnFilePrint)ON_COMMAND(ID_FILE_PRINT_D
4、IRECT,CEditView::OnFilePrint)ON_COMMAND(ID_FILE_PRINT_PREVIEW,CEditView::OnFilePrintPreview)END_MESSAGE_MAP()///////////////////////////////////////////////////////////////////////////////CCClientViewconstruction/destructionCCClientView::CCClientView(){//TODO:addconstructioncodeher
5、e}CCClientView::~CCClientView(){}BOOLCCClientView::PreCreateWindow(CREATESTRUCT&cs){//TODO:ModifytheWindowclassorstylesherebymodifying//theCREATESTRUCTcsBOOLbPreCreated=CEditView::PreCreateWindow(cs);cs.style&=~(ES_AUTOHSCROLL
6、WS_HSCROLL);//Enableword-wrappingreturnbPreCreated;}///
7、////////////////////////////////////////////////////////////////////////////CCClientViewdrawingvoidCCClientView::OnDraw(CDC*pDC){CCClientDoc*pDoc=GetDocument();ASSERT_VALID(pDoc);//TODO:adddrawcodefornativedatahere}///////////////////////////////////////////////////////////////////
8、////////////CCClientViewprintingBOOLCCClientView::OnPreparePrinting(CPrintInfo*pInfo){//defaultCEditViewpreparationreturnCEditView::OnPreparePrinting(pInfo);}voidCCClientView::OnBeginPrinting(CDC*pDC,CPrintInfo*pInfo){//DefaultCEditViewbeginprinting.CEditView::OnBeginPrinting(pDC,p
9、Info);}voidCCClientView::O
此文档下载收益归作者所有