資源簡介
在windows下實現的一個聊天程序 ,包含服務器端、客戶端源碼,可運行,在vs2010中實踐

代碼片段和文件信息
//?ChatClient.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“ChatClient.h“
#include?“MainFrm.h“
#include?“ChatClientDoc.h“
#include?“ChatClientView.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)
ON_COMMAND(ID_APP_ABOUT?OnAppAbout)
//?NOTE?-?the?ClassWizard?will?add?and?remove?mapping?macros?here.
//????DO?NOT?EDIT?what?you?see?in?these?blocks?of?generated?code!
//}}AFX_MSG_MAP
//?Standard?file?based?document?commands
ON_COMMAND(ID_FILE_NEW?CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN?CWinApp::OnFileOpen)
//?Standard?print?setup?command
ON_COMMAND(ID_FILE_PRINT_SETUP?CWinApp::OnFilePrintSetup)
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()
{
//?CG:?The?following?block?was?added?by?the?Windows?Sockets?component.
{
if?(!AfxSocketInit())
{
AfxMessageBox(CG_IDS_SOCKETS_INIT_FAILED);
return?FALSE;
}
}
//?Initialize?OLE?libraries
if?(!AfxOleInit())
{
AfxMessageBox(IDP_OLE_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
//?Change?the?registry?key?under?which?our?settings?are?stored.
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization.
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
LoadStdProfileSettings();??//?Load?standard?INI?file?options?(including?MRU)
//?Register?the?application‘s?document?templates.??Document?templates
//??serve?as?the?connection?between?documents?frame?windows?and?views.
CSingleDocTemplate*?pDocTemplate;
pDocTemplate?=?new?CSingleDocTemplate(
IDR_MAINframe
RUNTIME_CLASS(CChatClientDoc)
RUNTIME_CLASS(CMainframe)???????//?main?SDI?frame?window
RUNTIME_CLASS(CChatClientView));
pDocTemplate->SetContainerInfo(IDR_CNTR_INPLACE);
AddDocTemplate(pD
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????42172??2009-03-12?12:25??第三章\chat\ChatClient\ChatClient.aps
?????文件???????4812??2009-03-12?12:34??第三章\chat\ChatClient\ChatClient.clw
?????文件???????4659??2001-07-17?17:20??第三章\chat\ChatClient\ChatClient.cpp
?????文件???????5502??2001-07-17?17:20??第三章\chat\ChatClient\ChatClient.dsp
?????文件????????543??2001-07-17?17:20??第三章\chat\ChatClient\ChatClient.dsw
?????文件???????1400??2001-07-17?17:20??第三章\chat\ChatClient\ChatClient.h
?????文件?????164864??2009-03-12?12:34??第三章\chat\ChatClient\ChatClient.ncb
?????文件??????71680??2009-03-12?12:34??第三章\chat\ChatClient\ChatClient.opt
?????文件???????1224??2001-07-17?17:21??第三章\chat\ChatClient\ChatClient.plg
?????文件??????21658??2001-07-17?17:21??第三章\chat\ChatClient\ChatClient.rc
?????文件???????8456??2001-07-17?17:21??第三章\chat\ChatClient\ChatClientDoc.cpp
?????文件???????2205??2001-07-17?17:21??第三章\chat\ChatClient\ChatClientDoc.h
?????文件???????5234??2001-07-17?17:21??第三章\chat\ChatClient\ChatClientView.cpp
?????文件???????2041??2001-07-17?17:21??第三章\chat\ChatClient\ChatClientView.h
?????文件????????779??2001-07-17?17:21??第三章\chat\ChatClient\ChatSocket.cpp
?????文件????????700??2001-07-17?17:21??第三章\chat\ChatClient\ChatSocket.h
?????文件???????1167??2001-07-17?17:21??第三章\chat\ChatClient\CntrItem.cpp
?????文件???????1606??2001-07-17?17:21??第三章\chat\ChatClient\CntrItem.h
?????文件???????1068??2001-07-17?17:21??第三章\chat\ChatClient\Login.cpp
?????文件???????1220??2001-07-17?17:21??第三章\chat\ChatClient\Login.h
?????文件???????4312??2001-07-17?17:21??第三章\chat\ChatClient\MainFrm.cpp
?????文件???????1830??2001-07-17?17:21??第三章\chat\ChatClient\MainFrm.h
?????文件???????1589??2001-07-17?17:21??第三章\chat\ChatClient\Message.cpp
?????文件????????850??2001-07-17?17:21??第三章\chat\ChatClient\Message.h
?????文件???????1817??2001-07-17?17:21??第三章\chat\ChatClient\OnlineBar.cpp
?????文件????????989??2001-07-17?17:21??第三章\chat\ChatClient\OnlineBar.h
?????文件???????2221??2001-07-17?17:21??第三章\chat\ChatClient\OnlineList.cpp
?????文件???????1346??2001-07-17?17:21??第三章\chat\ChatClient\OnlineList.h
?????文件???????4740??2001-07-17?17:21??第三章\chat\ChatClient\ReadMe.txt
?????文件??????53248??2001-07-17?17:20??第三章\chat\ChatClient\Release\ChatClient.exe
............此處省略147個文件信息
評論
共有 條評論