wcsock.cpp

来自「经典C++书籍钱能C++书籍例子代码实例」· C++ 代码 · 共 44 行

CPP
44
字号
// WCSock.cpp : implementation file
//

#include "stdafx.h"
#include "MyWc.h"
#include "WCSock.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CWCSock

CWCSock::CWCSock()
{
}

CWCSock::~CWCSock()
{
}


// Do not edit the following lines, which are needed by ClassWizard.
#if 0
BEGIN_MESSAGE_MAP(CWCSock, CSocket)
	//{{AFX_MSG_MAP(CWCSock)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif	// 0

/////////////////////////////////////////////////////////////////////////////
// CWCSock member functions

void CWCSock::OnReceive(int nErrorCode) 
{
	// TODO: Add your specialized code here and/or call the base class
	 if(Receive(&m_Dat,sizeof(m_Dat))==sizeof(m_Dat))
	 ::PostMessage(::AfxGetApp()->m_pMainWnd->m_hWnd,RE_RECEIVED,(WPARAM)&m_Dat,0);
	CSocket::OnReceive(nErrorCode);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?