資源簡介
聊天程序,利用TCP/IP完成雙向數據收發。

代碼片段和文件信息
//?Info.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Info.h“
#include?“InfoDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CInfoApp
BEGIN_MESSAGE_MAP(CInfoApp?CWinApp)
//{{AFX_MSG_MAP(CInfoApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CInfoApp?construction
CInfoApp::CInfoApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CInfoApp?object
CInfoApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CInfoApp?initialization
BOOL?CInfoApp::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
CInfoDlg?dlg;
m_pMainWnd?=?&dlg;
CString?str;
eee=OpenMutex(MUTEX_ALL_ACCESSfalsestr);
if(eee==NULL)
{
eee=CreateMutex(NULLtruestr);
m=TRUE;
}
else
{
m=FALSE;
}
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;
}
int?CInfoApp::ExitInstance()?
{
if(eee?!=NULL)
ReleaseMutex(eee);
return?CWinApp::ExitInstance();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2415??2008-10-18?21:58??chat\Info.clw
?????文件???????2431??2004-07-11?13:28??chat\Info.cpp
?????文件???????3703??2005-11-28?19:17??chat\Info.dsp
?????文件????????531??2004-07-11?13:28??chat\Info.dsw
?????文件???????1371??2004-07-11?13:27??chat\Info.h
?????文件?????148480??2008-10-18?22:05??chat\Info.ncb
?????文件?????866856??2008-10-18?21:59??chat\Info.aps
?????文件????????781??2008-10-18?22:00??chat\Info.plg
?????文件???????7965??2008-10-18?21:59??chat\Info.rc
?????文件??????17468??2008-10-18?22:00??chat\InfoDlg.cpp
?????文件??????49664??2008-10-18?22:04??chat\Info.opt
?????文件???????1541??2004-07-11?13:27??chat\MySocket.cpp
?????文件???????1382??2007-10-27?21:51??chat\MySocket.h
?????文件???????3543??2004-07-11?13:27??chat\ReadMe.txt
?????文件????????206??2004-07-11?13:28??chat\StdAfx.cpp
?????文件???????1102??2004-07-11?13:27??chat\StdAfx.h
?????文件??????11776??2004-07-11?13:28??chat\res\135.avi
?????文件???????4152??2004-07-11?13:28??chat\res\49.bmp
?????文件???????4152??2004-07-11?13:28??chat\res\85.bmp
?????文件??????30414??2004-07-11?13:28??chat\res\about.bmp
?????文件?????193194??2004-07-11?13:28??chat\res\beijing.bmp
?????文件??????29718??2004-07-11?13:28??chat\res\bitmap3.bmp
?????文件?????553302??2004-07-11?13:28??chat\res\eee.bmp
?????文件???????1078??2004-07-11?13:28??chat\res\Info.ico
?????文件????????396??2004-07-11?13:28??chat\res\Info.rc2
?????文件??????37494??2004-07-11?13:28??chat\res\ti
?????文件????????653??2004-08-22?00:46??chat\res\xptheme.bin
?????文件???????1078??2008-10-18?15:17??chat\res\HOUSE.ICO
?????文件?????837080??2008-10-18?21:03??chat\Release\Info.res
?????文件????1546849??2008-10-17?12:59??chat\Release\StdAfx.sbr
............此處省略16個文件信息
評論
共有 條評論