資源簡介
該聊天程序包括服務器和客戶端兩部分,使用是MFC的CSOCKET類。
它可以使多個人聊天,其工作方式類似于網上聊天室,可以在同一臺機器上啟動
多個客戶端。
客戶端可以選擇談話對象,有32種動作,可以設置字體顏色,也可以"悄悄"地對某人說,對信息進行過濾。
服務器端可以“踢“人,并可以防止用戶名稱的重復。
代碼片段和文件信息
//?chatdoc.cpp?:?implementation?of?the?CChatDoc?class
//
//?This?is?a?part?of?the?Microsoft?Foundation?Classes?C++?library.
//?Copyright?(C)?1992-1997?Microsoft?Corporation
//?All?rights?reserved.
//
//?This?source?code?is?only?intended?as?a?supplement?to?the
//?Microsoft?Foundation?Classes?Reference?and?related
//?electronic?documentation?provided?with?the?library.
//?See?these?sources?for?detailed?information?regarding?the
//?Microsoft?Foundation?Classes?product.
#include?“stdafx.h“
#include?“chatter.h“
#include?“chatsock.h“
#include?“chatdoc.h“
#include?“chatvw.h“
#include?“sendvw.h“
#include?“setupdlg.h“
#ifdef?_WIN32
#ifndef?_UNICODE
#include?
#endif
#endif
#ifdef?_DEBUG
#undef?THIS_FILE
static?char?baseD_CODE?THIS_FILE[]?=?__FILE__;
#en
評論
共有 條評論