📄 mysocket.cpp
字号:
// MySocket.cpp : 实现文件
//
#include "stdafx.h"
#include "chat1.h"
#include "MySocket.h"
#include ".\mysocket.h"
#include "chat1Dlg.h"
// CMySocket
CMySocket::CMySocket()
: m_pDlg(NULL)
{
}
CMySocket::~CMySocket()
{
}
// CMySocket 成员函数
//void CMySocket::SetParent(Cchat1Dlg* pDlg)
//{
//设置成员变量
// m_pDlg=pDlg;
//}
void CMySocket::SetParent(Cchat1Dlg* pDlg)
{
//设置成员变量
m_pDlg=pDlg;
}
void CMySocket::OnAccept(int nErrorCode)
{
if(nErrorCode==0)
//调用CChat2Dlg类中的OnAccept成员函数
m_pDlg->OnAccept();
}
void CMySocket::OnConnect(int nErrorCode)
{
if(nErrorCode==0)
//调用CChat2Dlg类中的OnConnect成员函数
m_pDlg->OnConnect();
}
void CMySocket::OnReceive(int nErrorCode)
{
if(nErrorCode==0)
//调用CChat2Dlg类中的OnReceived()成员函数
m_pDlg->OnReceive();
}
void CMySocket::OnClose(int nErrorCode)
{
if(nErrorCode==0)
//调用CChat2Dlg类中的OnClose()成员函数
m_pDlg->OnClose();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -