📄 mysocket.cpp
字号:
// MySocket.cpp: implementation of the CMySocket class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Talk.h"
#include "MySocket.h"
#include "TalkDlg.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMySocket::CMySocket()
{
//put the member pointer to NULL
m_pDlg=NULL;
}
CMySocket::~CMySocket()
{
//put the member pointer to NULL
m_pDlg=NULL;
}
void CMySocket::SetParent(CTalkDlg* pDlg)
{
//set the member pointer
m_pDlg=pDlg;
}
void CMySocket::OnAccept(int nErrorCode)
{
if (nErrorCode==0)
//call the dialog's OnAccept function
m_pDlg->OnAccept();
}
void CMySocket::OnConnect(int nErrorCode)
{
if (nErrorCode==0)
//call the dialog's OnConnect function
m_pDlg->OnConnect();
}
void CMySocket::OnReceive(int nErrorCode)
{
if (nErrorCode==0)
//call the dialog's OnReceive function
m_pDlg->OnReceive();
}
void CMySocket::OnClose(int nErrorCode)
{
if (nErrorCode==0)
//call the dialog's OnClose function
m_pDlg->OnClose();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -