資源簡介
說明:1.測試按鈕模擬數據的動態接收。
2.此處接收數據為6通道接收。
3.接收的數據可以顯示在List控件中。
4.只做了A通道的動態曲線顯示。
5.保存數據可以直接把List控件中的數據導入Excle中并保存。
6.Y軸的數據可以根據接收的第一個數據進行自動調節波動范圍。
7.X軸可以根據數據的多少進行伸縮。
8.自動過濾出可用串口。

代碼片段和文件信息
//?ExportListToExcel.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“ExportListToExcel.h“
//#include?“SixPortDlg.h“
#include?
#include?
#include?
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CExportListToExcelApp
BEGIN_MESSAGE_MAP(CExportListToExcelApp?CWinApp)
//{{AFX_MSG_MAP(CExportListToExcelApp)
//?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()
/////////////////////////////////////////////////////////////////////////////
//?CExportListToExcelApp?construction
CExportListToExcelApp::CExportListToExcelApp()
{
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
/////////////////////////////////////////////////////////////////////////////
//?The?one?and?only?CExportListToExcelApp?object
CExportListToExcelApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CExportListToExcelApp?initialization
BOOL?CExportListToExcelApp::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
// CSixPortDlg?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;
}
//////////////////////////////////////////////////////////////////////////////
//名稱:GetExcelDriver
//功能:獲取ODBC中Excel驅動
//組織:未來工作室(Future?Studio)
//日期:2002.9.1
/////////////////////////////////////////////////////////////////////////////
CString?GetExcelDriver()
{
????char?szBuf[2001];
????WORD?cbBufMax?=?2000;
????WORD?cbBufOut;
????char?*pszBuf?=?szBuf;
????CString?sDriver;
????//?獲取已安裝驅動的名稱(涵數在odbcinst.h里)
????if?(!SQLGetInstalledDrivers(szBuf?cbBufMax?&cbBufOut))
????????return?““;
????
????//?檢索已安裝的驅動是否有Excel...
????do
????{
????????if?(strstr(pszBuf?“Excel“)?!=?0)
????????{
????????????//發現?!
????????????sDriver?=?CString(pszBuf);
????????????break;
????????}
????????pszBuf?=?strchr(
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????151607??2013-03-04?10:52??SixPort\Debug\SixPort.exe
?????文件???????8241??2013-02-22?10:32??SixPort\ExportListToExcel.cpp
?????文件???????1606??2006-08-26?10:21??SixPort\ExportListToExcel.h
?????文件?????200480??2001-01-17?16:46??SixPort\GdiPlus.lib
?????文件???????2364??2013-02-21?15:05??SixPort\MyListView.cpp
?????文件???????1216??2013-02-21?10:47??SixPort\MyListView.h
?????文件???????3597??2013-02-19?08:53??SixPort\ReadMe.txt
?????文件???????1078??2013-02-19?08:53??SixPort\res\SixPort.ico
?????文件????????399??2013-02-19?08:53??SixPort\res\SixPort.rc2
?????文件???????1144??2013-02-27?11:39??SixPort\resource.h
?????文件??????36732??2013-03-04?10:31??SixPort\SixPort.aps
?????文件???????1705??2013-03-04?10:53??SixPort\SixPort.clw
?????文件???????2171??2013-02-19?08:53??SixPort\SixPort.cpp
?????文件??????12102??2013-02-27?19:37??SixPort\SixPort.dsp
?????文件????????564??2013-02-27?11:02??SixPort\SixPort.dsw
?????文件???????1335??2013-02-19?08:53??SixPort\SixPort.h
?????文件?????361472??2013-03-04?10:53??SixPort\SixPort.ncb
?????文件??????54784??2013-03-04?10:53??SixPort\SixPort.opt
?????文件???????2535??2013-03-04?10:52??SixPort\SixPort.plg
?????文件???????6323??2013-03-04?10:31??SixPort\SixPort.rc
?????文件??????28466??2013-03-04?10:45??SixPort\SixPortDlg.cpp
?????文件???????2356??2013-03-04?10:41??SixPort\SixPortDlg.h
?????文件????????209??2013-02-19?08:53??SixPort\StdAfx.cpp
?????文件???????1102??2013-02-19?08:53??SixPort\StdAfx.h
?????目錄??????????0??2013-03-04?10:53??SixPort\Debug
?????目錄??????????0??2013-02-19?08:53??SixPort\res
?????目錄??????????0??2013-03-04?10:53??SixPort
-----------?---------??----------?-----??----
???????????????883588????????????????????27
............此處省略0個文件信息
評論
共有 條評論