用MFC开发的UDP接收和发送软件


用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  MFCUDPDebugmsocudp.exe

     文件     239404  2015-05-21 20:29  MFCUDPDebugmsocudp.ilk

     文件      14121  2015-05-21 20:29  MFCUDPDebugmsocudp.obj

     文件    5546804  2015-05-21 20:29  MFCUDPDebugmsocudp.pch

     文件     304128  2015-05-21 20:29  MFCUDPDebugmsocudp.pdb

     文件       3876  2015-05-21 20:29  MFCUDPDebugmsocudp.res

     文件      33697  2015-05-21 20:29  MFCUDPDebugmsocudpDlg.obj

     文件     106558  2015-05-21 20:29  MFCUDPDebugStdAfx.obj

     文件      18646  2015-05-21 20:29  MFCUDPDebugUdpAsySk.obj

     文件     197632  2015-05-21 20:29  MFCUDPDebugvc60.idb

     文件     364544  2015-05-21 20:29  MFCUDPDebugvc60.pdb

     文件       2194  1998-01-13 20:18  MFCUDPmsocudp.cpp

     文件       4312  1998-08-27 07:07  MFCUDPmsocudp.dsp

     文件        537  1998-08-27 07:07  MFCUDPmsocudp.dsw

     文件       1343  1998-01-13 18:59  MFCUDPmsocudp.h

     文件      41984  2015-05-21 20:29  MFCUDPmsocudp.ncb

     文件      48640  2015-05-21 20:29  MFCUDPmsocudp.opt

     文件       1724  2015-05-21 20:29  MFCUDPmsocudp.plg

     文件       6735  1998-01-22 01:30  MFCUDPmsocudp.rc

     文件       7817  1998-01-22 20:17  MFCUDPmsocudpDlg.cpp

     文件       1635  1998-01-22 01:27  MFCUDPmsocudpDlg.h

     文件       3370  1998-01-13 18:59  MFCUDPReadMe.txt

     文件       1434  1999-03-10 16:53  MFCUDPReadme2.txt

     文件       1078  1998-01-13 18:59  MFCUDP
esmsocudp.ico

     文件        399  1998-01-13 18:59  MFCUDP
esmsocudp.rc2

     文件       1098  1998-01-22 01:27  MFCUDP
esource.h

     文件        205  1998-01-13 18:59  MFCUDPStdAfx.cpp

     文件       1035  1998-01-13 18:59  MFCUDPStdAfx.h

     文件       4523  1999-01-10 19:12  MFCUDPUdpAsySk.cpp

     文件       1700  1998-01-22 00:29  MFCUDPUdpAsySk.h

............此处省略6个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)