#include "stdafx.h" #include "ClientSocket.h" #include "ChatRoomClientDlg.h" CClientSocket::CClientSocket() { } CClientSocket::~CClientSocket() { } void CClientSocket::SetDialog(CChatRoomClientDlg* pDialog) { m_pDlg = pDialog; } void CClientSocket::OnReceive(int nErrorCode) { CSocket::OnReceive(nErrorCode); if (m_pDlg) { m_pDlg->ReceiveText(); } }