?? lxsocket.cpp
字號:
// LxSocket.cpp : implementation file
//
#include "stdafx.h"
#include "lxdraw.h"
#include "LxSocket.h"
#include "LxDrawDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLxSocket
CLxSocket::CLxSocket()
{
}
CLxSocket::~CLxSocket()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CLxSocket, CAsyncSocket)
//{{AFX_MSG_MAP(CLxSocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CLxSocket member functions
void CLxSocket::SetParent(CDocument *pDoc)
{
m_pDoc=pDoc; //把創建CMySocket的文檔類對象指針存放在m_pDoc中。
}
void CLxSocket::OnAccept(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CLxdrawDoc*)m_pDoc)->OnAccept();//調用CDocument父類的同名函數
}
void CLxSocket::OnClose(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CLxdrawDoc*)m_pDoc)->OnClose();//調用CDocument父類的同名函數
}
void CLxSocket::OnReceive(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CLxdrawDoc*)m_pDoc)->OnReceive();//調用CDocument父類的同名函數
}
void CLxSocket::OnSend(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
if(nErrorCode==0)
((CLxdrawDoc*)m_pDoc)->OnSend();//調用CDocument父類的同名函數
}
void CLxSocket::OnConnect(int nErrorCode)
{
// TODO: Add your specialized code here and/or call the base class
CAsyncSocket::OnConnect(nErrorCode);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -