資源簡介
用MFC開發的UDP接收和發送軟件,有源碼,對于自己想用MFC開發的工程人員具有非常好的學習和參考價值

代碼片段和文件信息
//?msocudp.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“UDpAsySk.h“
#include?“msocudp.h“
#include?“msocudpDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CMsocudpApp
BEGIN_MESSAGE_MAP(CMsocudpApp?CWinApp)
//{{AFX_MSG_MAP(CMsocudpApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CMsocudpApp?construction
CMsocudpApp::CMsocudpApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CMsocudpApp?object
CMsocudpApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CMsocudpApp?initialization
BOOL?CMsocudpApp::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
CMsocudpDlg?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;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????114763??2015-05-21?20:29??MFCUDP\Debug\msocudp.exe
?????文件?????239404??2015-05-21?20:29??MFCUDP\Debug\msocudp.ilk
?????文件??????14121??2015-05-21?20:29??MFCUDP\Debug\msocudp.obj
?????文件????5546804??2015-05-21?20:29??MFCUDP\Debug\msocudp.pch
?????文件?????304128??2015-05-21?20:29??MFCUDP\Debug\msocudp.pdb
?????文件???????3876??2015-05-21?20:29??MFCUDP\Debug\msocudp.res
?????文件??????33697??2015-05-21?20:29??MFCUDP\Debug\msocudpDlg.obj
?????文件?????106558??2015-05-21?20:29??MFCUDP\Debug\StdAfx.obj
?????文件??????18646??2015-05-21?20:29??MFCUDP\Debug\UdpAsySk.obj
?????文件?????197632??2015-05-21?20:29??MFCUDP\Debug\vc60.idb
?????文件?????364544??2015-05-21?20:29??MFCUDP\Debug\vc60.pdb
?????文件???????2194??1998-01-13?20:18??MFCUDP\msocudp.cpp
?????文件???????4312??1998-08-27?07:07??MFCUDP\msocudp.dsp
?????文件????????537??1998-08-27?07:07??MFCUDP\msocudp.dsw
?????文件???????1343??1998-01-13?18:59??MFCUDP\msocudp.h
?????文件??????41984??2015-05-21?20:29??MFCUDP\msocudp.ncb
?????文件??????48640??2015-05-21?20:29??MFCUDP\msocudp.opt
?????文件???????1724??2015-05-21?20:29??MFCUDP\msocudp.plg
?????文件???????6735??1998-01-22?01:30??MFCUDP\msocudp.rc
?????文件???????7817??1998-01-22?20:17??MFCUDP\msocudpDlg.cpp
?????文件???????1635??1998-01-22?01:27??MFCUDP\msocudpDlg.h
?????文件???????3370??1998-01-13?18:59??MFCUDP\ReadMe.txt
?????文件???????1434??1999-03-10?16:53??MFCUDP\Readme2.txt
?????文件???????1078??1998-01-13?18:59??MFCUDP\res\msocudp.ico
?????文件????????399??1998-01-13?18:59??MFCUDP\res\msocudp.rc2
?????文件???????1098??1998-01-22?01:27??MFCUDP\resource.h
?????文件????????205??1998-01-13?18:59??MFCUDP\StdAfx.cpp
?????文件???????1035??1998-01-13?18:59??MFCUDP\StdAfx.h
?????文件???????4523??1999-01-10?19:12??MFCUDP\UdpAsySk.cpp
?????文件???????1700??1998-01-22?00:29??MFCUDP\UdpAsySk.h
............此處省略6個文件信息
評論
共有 條評論