功能:1 实时绘制数据曲线2 保存接受数据到文件3 能在各种参数下
源代码在线查看: 串口通信最终测试机dlg.h
// 串口通信最终测试机Dlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES
#include "clPlot.h"
#if !defined(AFX_DLG_H__90BFCD13_D276_4785_AE87_2A5ADCFCFD59__INCLUDED_)
#define AFX_DLG_H__90BFCD13_D276_4785_AE87_2A5ADCFCFD59__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
class CMyDlg : public CDialog
{
// Construction
public:
CStdioFile m_file;
CMyDlg(CWnd* pParent = NULL); // standard constructor
clPlot m_Plot;
int intdata[1024];
LONG length;
CString txtdata;
void plot(int id,double point);
void datadeal(int id,int *,int size);
// Dialog Data
//{{AFX_DATA(CMyDlg)
enum { IDD = IDD_MY_DIALOG };
CComboBox m_comboctr5;
CComboBox m_comboctr4;
CComboBox m_comboctr3;
CComboBox m_comboctr2;
CComboBox m_comboctr1;
CListBox m_comdataout;
CListBox m_comdatain;
CString m_comin;
CString m_comout;
CMSComm m_Comm;
int m_comboval1;
int m_comboval2;
int m_comboval3;
int m_comboval4;
int m_comboval5;
CString m_UserData;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMyDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnOpencom();
afx_msg void OnClosecom();
afx_msg void OnAutooutput();
afx_msg void OnManmakeinput();
afx_msg void OnClearOutput();
afx_msg void OnClearInput();
afx_msg void OnSenddata();
afx_msg void OnCommMscomm();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnSAVE();
afx_msg void OnOpenTxt();
afx_msg void OnMenuitem327726();
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLG_H__90BFCD13_D276_4785_AE87_2A5ADCFCFD59__INCLUDED_)