MFC之CSerialPort类双串口发送接收


MFC之CSerialPort类双串口发送接收http://blog.csdn.net/cracent/article/details/50988742
资源截图
代码片段和文件信息

// DoublePort.cpp : 定义应用程序的类行为。
//

#include “stdafx.h“
#include “DoublePort.h“
#include “DoublePortDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CDoublePortApp

BEGIN_MESSAGE_MAP(CDoublePortApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)

END_MESSAGE_MAP()


// CDoublePortApp 构造

CDoublePortApp::CDoublePortApp()
{
// 支持重新启动管理器
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CDoublePortApp 对象

CDoublePortApp theApp;


// CDoublePortApp 初始化

BOOL CDoublePortApp::InitInstance()
{
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControlsEx()。  否则,将无法创建窗口。
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// 将它设置为包括所有要在应用程序中使用的
// 公共控件类。
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();


AfxEnableControlContainer();

// 创建 shell 管理器,以防对话框包含
// 任何 shell 树视图控件或 shell 列表视图控件。
CShellManager *pShellManager = new CShellManager;

// 激活“Windows Native”视觉管理器,以便在 MFC 控件中启用主题
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));

// 标准初始化
// 如果未使用这些功能并希望减小
// 最终可执行文件的大小,则应移除下列
// 不需要的特定初始化例程
// 更改用于存储设置的注册表项
// TODO: 应适当修改该字符串,
// 例如修改为公司或组织名
SetRegistryKey(_T(“应用程序向导生成的本地应用程序“));

CDoublePortDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 在此放置处理何时用
//  “确定”来关闭对话框的代码
}
else if (nResponse == IDCANCEL)
{
// TODO: 在此放置处理何时用
//  “取消”来关闭对话框的代码
}
else if (nResponse == -1)
{
TRACE(traceAppMsg 0 “警告: 对话框创建失败,应用程序将意外终止。
“);
TRACE(traceAppMsg 0 “警告: 如果您在对话框上使用 MFC 控件,则无法 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS。
“);
}

// 删除上面创建的 shell 管理器。
if (pShellManager != NULL)
{
delete pShellManager;
}

// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
//  而不是启动应用程序的消息泵。
return FALSE;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     40448  2016-03-26 20:38  DoublePort.vsDoublePortv14.suo

     文件     239104  2016-03-26 20:33  DoublePortDebugDoublePort.exe

     文件    1641404  2016-03-26 20:33  DoublePortDebugDoublePort.ilk

     文件    8302592  2016-03-26 20:33  DoublePortDebugDoublePort.pdb

     文件       1254  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.log

     文件      70369  2016-03-26 20:23  DoublePortDoublePortDebugDoublePort.obj

     文件   60030976  2016-03-26 16:59  DoublePortDoublePortDebugDoublePort.pch

     文件      69836  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.res

     文件       2950  2016-03-26 20:30  DoublePortDoublePortDebugDoublePort.tlogCL.command.1.tlog

     文件      82490  2016-03-26 20:30  DoublePortDoublePortDebugDoublePort.tlogCL.read.1.tlog

     文件       2736  2016-03-26 20:30  DoublePortDoublePortDebugDoublePort.tlogCL.write.1.tlog

     文件        154  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tlogDoublePort.lastbuildstate

     文件       1586  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tloglink.command.1.tlog

     文件       6082  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tloglink.read.1.tlog

     文件        792  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tloglink.write.1.tlog

     文件        346  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tlog
c.command.1.tlog

     文件       2932  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tlog
c.read.1.tlog

     文件        206  2016-03-26 20:33  DoublePortDoublePortDebugDoublePort.tlog
c.write.1.tlog

     文件      61424  2016-03-26 20:30  DoublePortDoublePortDebugDoublePortDlg.obj

     文件      54280  2016-03-26 17:00  DoublePortDoublePortDebugdoubleportdlg.obj.enc

     文件     169250  2016-03-26 16:59  DoublePortDoublePortDebugSerialPort.obj

     文件     924461  2016-03-26 16:59  DoublePortDoublePortDebugstdafx.obj

     文件    2386944  2016-03-26 20:30  DoublePortDoublePortDebugvc140.idb

     文件    9072640  2016-03-26 20:30  DoublePortDoublePortDebugvc140.pdb

     文件     108624  2016-03-26 20:33  DoublePortDoublePortDoublePort.aps

     文件       2425  2016-03-26 16:40  DoublePortDoublePortDoublePort.cpp

     文件        467  2016-03-26 16:11  DoublePortDoublePortDoublePort.h

     文件      11354  2016-03-26 20:33  DoublePortDoublePortDoublePort.rc

     文件      10880  2016-03-26 16:59  DoublePortDoublePortDoublePort.vcxproj

     文件       2262  2016-03-26 16:40  DoublePortDoublePortDoublePort.vcxproj.filters

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

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

发表评论

评论列表(条)