資源簡介
可以直接運行使用的,基于socket套接字的局域網聊天程序,程序包括了完整的界面和代碼。

代碼片段和文件信息
//?ChatClient.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“ChatClient.h“
#include?“ChatClientDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChatClientApp
BEGIN_MESSAGE_MAP(CChatClientApp?CWinApp)
//{{AFX_MSG_MAP(CChatClientApp)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG
ON_COMMAND(ID_HELP?CWinApp::onhelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CChatClientApp?construction
CChatClientApp::CChatClientApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CChatClientApp?object
CChatClientApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CChatClientApp?initialization
BOOL?CChatClientApp::InitInstance()
{
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?Standard?initialization
//?If?you?are?not?using?these?features?and?wish?to?reduce?the?size
//??of?your?final?executable?you?should?remove?from?the?following
//??the?specific?initialization?routines?you?do?not?need.
#ifdef?_AFXDLL
Enable3dControls(); //?Call?this?when?using?MFC?in?a?shared?DLL
#else
Enable3dControlsStatic(); //?Call?this?when?linking?to?MFC?statically
#endif
CChatClientDlg?dlg;
m_pMainWnd?=?&dlg;
int?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????24576??2003-05-16?23:53??chat\ChatClient.exe
?????文件??????20480??2003-05-16?23:54??chat\ChatSvr.exe
?????文件??????21484??2003-05-16?23:54??chat\ChatSvr\ChatSvr.aps
?????文件???????1839??2003-05-16?23:54??chat\ChatSvr\ChatSvr.clw
?????文件???????2171??2003-03-20?22:24??chat\ChatSvr\ChatSvr.cpp
?????文件???????4581??2003-03-20?22:24??chat\ChatSvr\ChatSvr.dsp
?????文件????????539??2003-03-20?22:24??chat\ChatSvr\ChatSvr.dsw
?????文件???????1335??2003-03-20?22:24??chat\ChatSvr\ChatSvr.h
?????文件?????107520??2003-05-16?23:55??chat\ChatSvr\ChatSvr.ncb
?????文件??????74752??2003-05-16?23:55??chat\ChatSvr\ChatSvr.opt
?????文件???????2367??2003-05-16?23:54??chat\ChatSvr\ChatSvr.plg
?????文件???????5791??2003-03-20?22:24??chat\ChatSvr\ChatSvr.rc
?????文件???????5586??2003-03-20?22:24??chat\ChatSvr\ChatSvrDlg.cpp
?????文件???????1664??2003-03-20?22:24??chat\ChatSvr\ChatSvrDlg.h
?????文件???????1110??2003-03-20?22:24??chat\ChatSvr\ClientSocket.cpp
?????文件???????1308??2003-03-20?22:24??chat\ChatSvr\ClientSocket.h
?????文件????????926??2003-03-20?22:24??chat\ChatSvr\InitDlg.cpp
?????文件???????1187??2003-03-20?22:24??chat\ChatSvr\InitDlg.h
?????文件???????1060??2003-03-20?22:24??chat\ChatSvr\ListeningSocket.cpp
?????文件???????1301??2003-03-20?22:24??chat\ChatSvr\ListeningSocket.h
?????文件???????3597??2003-03-20?22:24??chat\ChatSvr\ReadMe.txt
?????文件????????209??2003-03-20?22:24??chat\ChatSvr\StdAfx.cpp
?????文件???????1106??2003-03-20?22:24??chat\ChatSvr\StdAfx.h
?????文件????????821??2003-03-20?22:24??chat\ChatSvr\resource.h
?????文件???????1078??2003-03-20?22:24??chat\ChatSvr\res\ChatSvr.ico
?????文件????????399??2003-03-20?22:24??chat\ChatSvr\res\ChatSvr.rc2
?????文件??????20480??2003-05-16?23:54??chat\ChatSvr\Release\ChatSvr.exe
?????文件??????21980??2003-05-16?23:53??chat\ChatClient\ChatClient.aps
?????文件???????1915??2003-05-16?23:54??chat\ChatClient\ChatClient.clw
?????文件???????2213??2003-03-20?22:24??chat\ChatClient\ChatClient.cpp
............此處省略30個文件信息
- 上一篇:電壓型PWM整流器控制器的設計
- 下一篇:wx-config.exe
評論
共有 條評論