資源簡介
1. 實現一個圖形用戶界面局域網內的消息系統。
2. 功能:建立一個局域網內的簡單的P2P消息系統,程序既是服務器又是客戶,服務器端口使用3333。

代碼片段和文件信息
//?Chat.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Chat.h“
#include?“ChatDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CChatApp
BEGIN_MESSAGE_MAP(CChatApp?CWinApp)
//{{AFX_MSG_MAP(CChatApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CChatApp?construction
CChatApp::CChatApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CChatApp?object
CChatApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CChatApp?initialization
BOOL?CChatApp::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
CWinApp::SetDialogBkColor(RGB(210255180)RGB(00255));
CChatDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????147542??2010-02-25?14:45??計算機網絡課程設計\Chat.exe
?????文件??????39140??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.aps
?????文件???????3472??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.clw
?????文件???????2187??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.cpp
?????文件???????4982??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.dsp
?????文件????????516??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.dsw
?????文件???????1302??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.h
?????文件?????377856??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.ncb
?????文件??????56832??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.opt
?????文件???????1271??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.plg
?????文件???????8727??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\Chat.rc
?????文件??????13105??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\ChatDlg.cpp
?????文件???????1924??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\ChatDlg.h
?????文件???????4665??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\CtrlSocket.cpp
?????文件???????1281??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\CtrlSocket.h
?????文件????????771??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\FileDlg.cpp
?????文件???????1050??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\FileDlg.h
?????文件???????3803??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\FileSocket.cpp
?????文件???????1375??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\FileSocket.h
?????文件???????9072??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\PathDialog.cpp
?????文件???????1919??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\PathDialog.h
?????文件???????3543??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\ReadMe.txt
?????文件???????1970??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\resource.h
?????文件???????1791??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\SETDIR.cpp
?????文件???????1262??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\SETDIR.h
?????文件????????206??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\StdAfx.cpp
?????文件???????1180??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\StdAfx.h
?????文件???????5743??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\TalkSocket.cpp
?????文件???????1300??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\TalkSocket.h
?????文件?????????71??2010-02-25?14:45??計算機網絡課程設計\Chat0222C\說明.txt
............此處省略29個文件信息
- 上一篇:免費的BACnet測試工具
- 下一篇:LM358的24個典型應用電路
評論
共有 條評論