資源簡介
本次課程設計,并不完善。。還有后續的美化功能沒實現,但基本功能已經出來了。。

代碼片段和文件信息
//?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(“asdfasdf!“);
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
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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1221??2005-01-08?17:59??chat\chat.clw
?????文件???????2114??2008-03-04?16:31??chat\chat.cpp
?????文件???????4120??2008-12-03?10:48??chat\chat.dsp
?????文件????????531??2008-03-04?16:27??chat\chat.dsw
?????文件???????1302??2008-03-04?16:27??chat\chat.h
?????文件???????1499??2009-03-01?21:32??chat\chat.plg
?????文件???????3543??2008-03-04?16:27??chat\ReadMe.txt
?????文件????????820??2008-03-04?19:02??chat\Resource.h
?????文件????????206??2008-03-04?16:27??chat\StdAfx.cpp
?????文件???????1074??2008-03-04?16:33??chat\StdAfx.h
?????文件???????5506??2008-12-30?10:00??chat\chat.rc
?????文件???????1663??2008-12-30?10:13??chat\chatDlg.h
?????文件???????6142??2008-12-30?11:44??chat\chatDlg.cpp
?????文件???????1078??2008-03-04?16:27??chat\res\chat.ico
?????文件????????396??2008-03-04?16:27??chat\res\chat.rc2
????....SHR?????????8??2009-03-06?09:10??chat\res\Desk_top_.ini
????....SHR?????????8??2009-03-06?09:10??chat\Desk_top_.ini
?????文件?????205824??2009-03-01?21:32??chat\Debug\vc60.idb
?????文件?????364544??2005-01-08?16:27??chat\Debug\vc60.pdb
?????文件?????218024??2005-01-08?16:27??chat\Debug\chat.ilk
?????文件?????106433??2005-01-08?16:27??chat\Debug\StdAfx.obj
?????文件??????30074??2005-01-08?16:27??chat\Debug\chatDlg.obj
?????文件??????13049??2005-01-08?16:27??chat\Debug\chat.obj
????....SHR?????????8??2009-03-06?09:10??chat\Debug\Desk_top_.ini
?????文件??????10606??2009-03-01?21:32??chat\Debug\RCa11376
?????文件???????2560??2008-02-23?09:11??chat\chat.suo
?????文件??????41984??2009-03-01?21:40??chat\chat.ncb
?????文件??????10606??2009-03-01?21:32??chat\RCa13724
?????文件??????49664??2009-03-01?21:40??chat\chat.opt
?????目錄??????????0??2008-12-30?11:45??chat\res
............此處省略5個文件信息
評論
共有 條評論