www.pudn.com > vectormap.rar > ReceiveData.cpp


// ReceiveData.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "MapApp.h" 
#include "ReceiveData.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CReceiveData 
 
CReceiveData::CReceiveData() 
{ 
} 
 
CReceiveData::~CReceiveData() 
{ 
} 
 
 
// Do not edit the following lines, which are needed by ClassWizard. 
#if 0 
BEGIN_MESSAGE_MAP(CReceiveData, CAsyncSocket) 
	//{{AFX_MSG_MAP(CReceiveData) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
#endif	// 0 
 
///////////////////////////////////////////////////////////////////////////// 
// CReceiveData member functions 
 
void CReceiveData::OnReceive(int nErrorCode)  
{ 
	// TODO: Add your specialized code here and/or call the base class 
	char lpBuf[512]; 
	int m_length; 
	m_length=Receive( lpBuf, 512);//接收信息长度 
	//发送消息,激活数据处理函数 
	m_view->SendMessage(WM_USER_RECEIVE_DATA,m_length,(LPARAM)lpBuf); 
	 
//	CAsyncSocket::OnReceive(nErrorCode); 
}