⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multiporttestdlg.h

📁 利用CSerialPort实现的双串口通信测试程序
💻 H
字号:
// MultiportTestDlg.h : header file
//

#if !defined(AFX_MULTIPORTTESTDLG_H__34BA09B4_368E_4F99_BEA7_EFED6BFE933F__INCLUDED_)
#define AFX_MULTIPORTTESTDLG_H__34BA09B4_368E_4F99_BEA7_EFED6BFE933F__INCLUDED_

#include "SerialPort.h"

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMultiportTestDlg dialog

class CMultiportTestDlg : public CDialog
{
// Construction
public:
	CMultiportTestDlg(CWnd* pParent = NULL);	// standard constructor
    
	CSerialPort m_serialCom1;
	CSerialPort m_serialCom2;

	int icom1ReceiveRadio;//Hex/Asc码显示选择标志
	int icom1SendRadio;//Hex/Asc码发送选择标志
	BOOL bcom1Send;//切换自动发送和停止发送
	int icom2ReceiveRadio;
	int icom2SendRadio;
	BOOL bcom2Send;
// Dialog Data
	//{{AFX_DATA(CMultiportTestDlg)
	enum { IDD = IDD_MULTIPORTTEST_DIALOG };
	CButton	m_btnCom2Manualsend;
	CButton	m_btnCom1Manualsend;
	CButton	m_com2ASCsend;
	CButton	m_com2ASCdisp;
	CButton	m_com2HEXsend;
	CButton	m_com2HEXdisp;
	CButton	m_com1HEXsend;
	CButton	m_com1HEXdisp;
	CButton	m_com1ASCsend;
	CButton	m_com1ASCdisp;
	CButton	m_btnOpencom2;
	CButton	m_btnOpencom1;
	CButton	m_btnCom1Autosend;
	CButton	m_btnCom2Autosend;
	CButton	m_btnClosecom2;
	CButton	m_btnClosecom1;
	CString	m_com1Receive;
	CString	m_com1Send;
	UINT	m_com1Timer;
	CString	m_com2Receive;
	CString	m_com2Send;
	UINT	m_com2Timer;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMultiportTestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMultiportTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnCom1HEXdisp();
	afx_msg void OnCom1ASCdisp();
	afx_msg void OnCom1HEXsend();
	afx_msg void OnCom1ASCsend();
	afx_msg void OnOpenCOM1();
	afx_msg void OnCloseCOM1();
	afx_msg void OnRefreshCOM1data();
	afx_msg void OnCom1Manualsend();
	afx_msg void OnCom1Clearsend();
	afx_msg void OnCom1Autosend();
	afx_msg LONG OnCommunication(WPARAM ch,LPARAM port);
	afx_msg void OnOpenCOM2();
	afx_msg void OnRefreshCOM2data();
	afx_msg void OnCloseCOM2();
	afx_msg void OnCom2Manualsend();
	afx_msg void OnCom2Clearsend();
	afx_msg void OnCom2Autosend();
	afx_msg void OnCom2HEXdisp();
	afx_msg void OnCom2ASCdisp();
	afx_msg void OnCom2HEXsend();
	afx_msg void OnCom2ASCsend();
	afx_msg void OnTimer(UINT nIDEvent);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MULTIPORTTESTDLG_H__34BA09B4_368E_4F99_BEA7_EFED6BFE933F__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -