资源简介
聊天程序,利用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个文件信息
相关资源
- C++多线程网络编程Socket
- socket客户端.c
- socket服务端.c
- socket tcp应用
- socket通讯c++源码(客户端+服务端)
- MFC的异步网络通讯应用程序
- 各种关于CAsyncSocketCSocket内幕及其用法
- MFC多人聊天室
- 使用socket套接字发送udp数据包
- CAsyncSocket异步实现服务器与客户端
- 基于socket文件传输的实现源码[C++]
- C语言实现TCP/IP协议通信和UDP协议通信
- c语言+UDP+DES加密+socket编程
- 局域网下,手机可以和电脑通过sock
- 计算机网络课程设计之Ping程序含C++原
- 基于c++和winsocket的局域网聊天源代码
- 基于udp的socket编程
- VC++,CSocket实现网络聊天,可发文件,
- 基于TCP协议的文件传输编程
- Socket编写的一个基于MFC的聊天程序源
- C++写的网络共享白板
- 基于TCP/IP socket的局域网聊天系统
- C++编写的多线程C/S模式仿QQ软件
- c++ socket 实现 语音 通信 双工
- MFC Csocket实现点对点文件传输
- CSocket端口扫描源代码MFC、VC++耿网出品
- 简单的基于MFC的Socket点对点对话客户
- MFC简单的客户端服务器通信软件
- 网络五子棋双人对弈系统
- 自己编写的C++基于socket编程的UDP聊天
评论
共有 条评论