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

📄 serial portdlg.h

📁 VC实现单线程的串口通信程序
💻 H
字号:
// serial portDlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES

#if !defined(AFX_SERIALPORTDLG_H__F1FF5E77_62AB_4934_B5FB_58B9BCEA9B37__INCLUDED_)
#define AFX_SERIALPORTDLG_H__F1FF5E77_62AB_4934_B5FB_58B9BCEA9B37__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CSerialportDlg dialog

class CSerialportDlg : public CDialog
{
// Construction
public:
	int m_Port;

	void InitComm();

	CSerialportDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CSerialportDlg)
	enum { IDD = IDD_SERIALPORT_DIALOG };
	CComboBox	m_Comb2;
	CComboBox	m_Comb;
	CMSComm	m_Comm;
	CString	m_Receive;
	CString	m_Send;
	CString	m_State;
	int		m_Periods;
	BOOL	m_bcheck;
	//}}AFX_DATA

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

// Implementation
protected:


	int m_Speed;





	char Rb2[10];
	char Rb1[10];
	char PortNum2[20];
	char PortNum1[20];



	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CSerialportDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSelchangeCombolist();
	afx_msg void OnOpenport();
	afx_msg void OnSend();
	afx_msg void OnOnCommMscomm();
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnQuit();
	afx_msg void OnInformation();
	afx_msg void OnSelchangeCombolist2();
	afx_msg void OnClearRe();
	afx_msg void OnClearSend();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnAutoSend();
	afx_msg void OnTimer(UINT nIDEvent);
	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_SERIALPORTDLG_H__F1FF5E77_62AB_4934_B5FB_58B9BCEA9B37__INCLUDED_)

⌨️ 快捷键说明

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