-
第一个MFC的WinSocket编程示例
环境:Windows XP SP 3、 VC++ 6.0、 Windows Server 2003 SDK
使用步骤:
1、下载解压之后,使用VC++ 6.0 IDE打开.dws文件
2、点击“!”按钮运行程序
3、如果一切正常会出现一个对话框,然后选择下拉框中的“服务端”启动服务器进程--接着点击“监听”按钮
4、然后再点击“!”按钮运行客户端进程
5、如果一切正常,那么选择下拉框中的“客户端”启动客户端进程--接着点击“连接”按钮,让客户端连接到socket服务器
6、在客户端的“消息”栏中输入信息,然后点击“发送”按钮
7、点击服务器端进程,应该可以看见客户端发送过来的消息,然后可以在“消息”栏中输入响应信息,然后点击“发送”按钮,此时会在客户端进程中看服务器端进程响应的信息
该示例是实现了一个客户端对象对应一个服务端对象的socket的网络编程--最简单的VC++的网络编程示例。该示使用主要是自定义一个类--它继承MFC库中CAsyncSocket类,然后重写OnAccept, OnSend, OnReceive和OnClose方法来实现一对一的VC++的socket网络编程。注意:自定义类关联应用向导生成的对话框类,需要在头文件中书写语句“class CHelloSocketDlg;”,并且在.cpp文件中写入语句“#include "HelloSocketDlg.h";”,否则编译不会通过!
本示例使用Dialog模式的UI是为方便说明socket编程,在对话框类的OnInitDialog方法有初始化的成员变量的注释说明,在自定义类中的注释非常详细。本人觉得MFC使用异步通信类CAsyncSocket实现Java中的ServerSocket类和Socket类的编程效果,是非常牛的!(虽然本人认为它还封装得不够OO--因为它封装得让使用者觉得“很傻很天真”)。
- 2022-03-22 11:57:16下载
- 积分:1
-
首OPENCV单目标定
相机的单目标定,使用张正友标定法,可靠使用(The monocular camera calibration, using the zhangzhengyou calibration method, reliable use)
- 2017-09-23 20:48:47下载
- 积分:1
-
cpp
首先通过文件操作,读取文件内容,把字符逐个提取后统计字符频率,建立哈夫曼树和进行哈夫曼编码,当然这是根据ASCII编码来将字符转换为二进制,然后实现前缀编码,然后把编码后的使用二进制流写入相应文件(First through file operations, read the file content, the characters one by one after extracting character frequency statistics, establish a Huffman tree and Huffman encoding, and, of course, this is according to ASCII code to convert characters to the binary, then realize the prefix encoding, and then the encoded using binary stream into the corresponding files
)
- 2013-12-01 14:18:04下载
- 积分:1
-
MFC-examples
达内MFC例子集源码,内容涉及消息映射、工具栏的使用、状态栏操作、视图/窗口、动态创建未知类型的对象、MFC文档类作用、MFC单文档视图应用程序(SDI)、MFC多文档视图应用程序(MDI)、ATL组件编写、对话框的数据交换、MFC基本控件、列表 ListCtrl控件的使用等相关知识点,还有更多不一一列举了。(Set up the MFC source code examples, involving message mapping, using the toolbar, status bar operation, view/window dynamically create objects of unknown type, MFC document class action, MFC single document view application (SDI), MFC multi-document view of the application (MDI), ATL component preparation, data exchange dialog, MFC basic controls, such as a list of related knowledge ListCtrl use controls, and many more do not list them.)
- 2014-07-02 17:56:56下载
- 积分:1
-
programs
一些matlab的程序,初学数字信号处理时的联系用,是经典书籍的答案(small)
- 2009-02-22 18:24:49下载
- 积分:1
-
mac
使用C++代码编写获取计算机mac地址程序,返回为Char指针(Written in C++ code to get mac address computer program, returns a pointer to a Char)
- 2012-02-01 17:31:27下载
- 积分:1
-
GCMC
巨正则系综蒙特卡罗算法的源程序;可以用来进行吸附等分子模拟;最大的好处在于可以插入或删除原子(Grand canonical ensemble Monte Carlo algorithm source can be used for adsorption, molecular simulation biggest advantage is that you can insert or delete atom)
- 2008-06-09 14:45:03下载
- 积分:1
-
00687992LDPC
说明: LDPC的编码和译码程序 采用vc及matlab(LDPC coding and decoding process, and matlab using vc)
- 2011-04-06 10:41:57下载
- 积分:1
-
binksdk
Bink SDK version 1.5y
- 2018-05-07 16:01:45下载
- 积分:1
-
2ddp_node
2ddp dynamic mesh for fluent udf
- 2013-12-12 15:26:08下载
- 积分:1