mysocket.cpp
来自「Visual C++ 的学习资料一」· C++ 代码 · 共 46 行
CPP
46 行
// Mysocket.cpp : implementation file
//
#include "stdafx.h"
#include "Client.h"
#include "Mysocket.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMysocket
CMysocket::CMysocket(CClientDlg* pDlg)
{
pClientdlg = pDlg;
}
CMysocket::~CMysocket()
{
}
// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CMysocket, CSocket)
//{{AFX_MSG_MAP(CMysocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif // 0
/////////////////////////////////////////////////////////////////////////////
// CMysocket member functions
void CMysocket::OnReceive(int nErrorCode)
{
CSocket::OnReceive(nErrorCode);
if (pClientdlg)
{
pClientdlg->ReceiveData();//调用主对话框的ReceiveData方法接收数据
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?