资源简介
此程序利用MFC技术结合MSComm控件,使用C++语言编写。程序功能包括:手动设置串口参数,串行接收和发送数据,可以显示接收数据和保存接收数据等功能。此程序可以作为单片机与微机串口通信时的调试工具。自己动手编写这样一个程序,对学习MFC有相当大帮助而且对串口通信也有一定了解,在以后编写上位机程序的串口通信部分基本就没什么问题了!希望给有兴趣的朋友带来帮助!
代码片段和文件信息
//Download by http://www.NewXing.com
// COMTOOL.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “COMTOOL.h“
#include “COMTOOLDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCOMTOOLApp
BEGIN_MESSAGE_MAP(CCOMTOOLApp CWinApp)
//{{AFX_MSG_MAP(CCOMTOOLApp)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CCOMTOOLApp construction
CCOMTOOLApp::CCOMTOOLApp()
{
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CCOMTOOLApp object
CCOMTOOLApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CCOMTOOLApp initialization
BOOL CCOMTOOLApp::InitInstance()
{
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
CCOMTOOLDlg 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;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 277568 2005-05-26 13:48 www.NewXing.com\串口通信\COMTOOL.APS
....... 240118 2005-05-25 19:19 www.NewXing.com\串口通信\res\bitmap1.bmp
....... 2654 2005-05-26 13:48 www.NewXing.com\串口通信\COMTOOL.clw
文件 2115 2011-04-12 11:54 www.NewXing.com\串口通信\COMTOOL.cpp
文件 14111 2011-04-12 11:54 www.NewXing.com\串口通信\COMTOOLDlg.cpp
文件 18067 2011-04-12 11:54 www.NewXing.com\串口通信\SerialPort.cpp
文件 247 2011-04-12 11:54 www.NewXing.com\串口通信\StdAfx.cpp
..A.SH. 6144 2005-07-15 17:29 www.NewXing.com\串口通信\res\Thumbs.db
....... 4378 2005-05-25 19:19 www.NewXing.com\串口通信\COMTOOL.dsp
....... 539 2005-05-25 09:16 www.NewXing.com\串口通信\COMTOOL.dsw
文件 1373 2011-04-12 11:54 www.NewXing.com\串口通信\COMTOOL.h
文件 2609 2011-04-12 11:54 www.NewXing.com\串口通信\COMTOOLDlg.h
文件 1734 2011-04-12 11:54 www.NewXing.com\串口通信\Resource.h
文件 3131 2011-04-12 11:54 www.NewXing.com\串口通信\SerialPort.h
文件 1092 2011-04-12 11:54 www.NewXing.com\串口通信\StdAfx.h
....... 1078 2005-05-25 19:19 www.NewXing.com\串口通信\res\COMTOOL.ico
....... 66560 2005-05-26 13:48 www.NewXing.com\串口通信\COMTOOL.ncb
....... 48640 2005-05-26 13:48 www.NewXing.com\串口通信\COMTOOL.opt
....... 707 2005-05-26 13:48 www.NewXing.com\串口通信\COMTOOL.plg
....... 8317 2005-05-26 13:48 www.NewXing.com\串口通信\COMTOOL.rc
....... 399 2005-05-25 09:16 www.NewXing.com\串口通信\res\COMTOOL.rc2
....... 3597 2005-05-25 09:16 www.NewXing.com\串口通信\ReadMe.txt
目录 0 2005-06-24 21:35 www.NewXing.com\串口通信\Release
目录 0 2005-06-24 21:35 www.NewXing.com\串口通信\res
目录 0 2005-06-24 21:35 www.NewXing.com\串口通信
----------- --------- ---------- ----- ----
705178 25
- 上一篇:C语言航空客运订票系统
- 下一篇:C语言大作业西北工业大学
相关资源
- vc++做的考试系统c/s模式
- VC++ 向指定串口发送和接收数据可十六
- vc++FTP搜索工具()
- 基于VC++的图像修复源代码
- 一个数字水印的VC++源程序,支持图片
- 蜘蛛纸牌VC++
- VC++界面编程之 实现一个画板并提供
- VC++ WTL 9.0 安装包
- VC++ 内存扫描与内存数据读写.rar
- 画图程序最新版 MFC/VC/VC++ 很多功能哦
- 模拟船只航迹发生的VC++程序,是航船
- MT4接口API,VC++调用范例MT4 API
- 仿雷电射击游戏基于VC++MFC
- VC++对话框CDialog的全屏显示及控件居中
- VC++中对Access数据库操作
- VC++ OpenGL三维物体建模--雨伞的绘制(
- VC++ 控制IE网页操作
- VC++深入详解 pdf
- VC++局域网屏幕监控(客户端和服务器
- vc++著名的木马程序BO2000源代码.rar
- 推箱子游戏用C语言在VC++6.0下编写
- 语音信号端点检测(VC++6.0)
- vc++6.0 基于mfc音乐播放器
- 利用VC++编写的直线圆弧插补的实现
- 边界跟踪算法的实现,图像处理 c++
- VC++(VS2008)\“橡皮筋\“CRectTracker类
- vc++6.0DES加密算法+数据加密+文件加密
- 用DEVC++实现的小型通信录程序带实验
- 个人相册管理系统————VC++
- 软件测试实验报告——三角形问题
评论
共有 条评论