?? comportrdlg.h
字號:
// ComPortRDlg.h : header file
//
#if !defined(AFX_COMPORTRDLG_H__762B9BE9_F50D_4CB6_8DDE_C499803CA663__INCLUDED_)
#define AFX_COMPORTRDLG_H__762B9BE9_F50D_4CB6_8DDE_C499803CA663__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "mscomm.h"
#include "ICM30.h"
#define NN 10
/////////////////////////////////////////////////////////////////////////////
// CComPortRDlg dialog
class CComPortRDlg : public CDialog
{
// Construction
struct ComPortInf //串口信息
{
int PortID;
int PortType;
int PortCommFormat;
int PortAddress;
};
struct ComPortSetInf //串口配置信息
{
int PortAddress;
CString PortCommFormat;
};
struct SmSetInf
{
int ScCode;
int SsCode;
int SuCode;
int SmId;
int TimeOut;
int SmType;
int Protocol;
int Address;
int PollingTime;
int PortId;
};
struct AlarmPortInf
{
int PortAddress;
};
public:
CByteArray myArray;
CICM30 myICM30;
int AlarmPortId[8];
CMSComm m_myCom8;
CMSComm m_myCom7;
CMSComm m_myCom6;
CMSComm m_myCom5;
CMSComm m_myCom4;
CMSComm m_myCom3;
CMSComm m_myCom2;
CMSComm m_myCom1;
int ComCounter;
int SmCounter;
ComPortSetInf myComConfig[64];
SmSetInf mySmSetInf[64];
AlarmPortInf AlarmPort[64];
BOOL OpenCom(int i, CString ComName);
BOOL OpenComPort(_RecordsetPtr &recPtr, CString &strSQL);
ComPortInf ComPortInfN[NN];
_RecordsetPtr m_pComPort;
CComPortRDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CComPortRDlg)
enum { IDD = IDD_COMPORTR_DIALOG };
CEdit m_AlarmDisplay;
CListCtrl m_List;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CComPortRDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CComPortRDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnReaddata();
afx_msg void OnIdcReadalarmdata();
afx_msg void OnOpencom();
afx_msg void OnReadportinf();
afx_msg void OnStartalarm();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnOnCommMscomm1();
afx_msg void OnChangeAlarmdisplay();
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_COMPORTRDLG_H__762B9BE9_F50D_4CB6_8DDE_C499803CA663__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -