mscommdlg.h

来自「使用串口控件 在vc中基于对话框的串口编程」· C头文件 代码 · 共 76 行

H
76
字号
// MSCommDlg.h : header file
//

#if !defined(AFX_MSCOMMDLG_H__E31A04F3_8786_41ED_A584_A5690ACA7679__INCLUDED_)
#define AFX_MSCOMMDLG_H__E31A04F3_8786_41ED_A584_A5690ACA7679__INCLUDED_

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

class CMSCommDlg : public CDialog
{
// Construction
protected:
	CMSComm m_Comm;//定义MSComm控件变量
public:
	int m_iSendMode;
	int String2Hex(CString str, CByteArray &senddata);
	int m_nPort;
	int DisplayMode;
	char ConvertHexChar(char ch);
	CMSCommDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CMSCommDlg)
	enum { IDD = IDD_MSCOMM_DIALOG };
	CButton	m_nSentType;
	CButton	m_SendType;
	CComboBox	m_cComPort;
	CComboBox	m_cDisplayMode;
	CEdit	m_nEdit;
	CString	m_strReceive;
	CString	m_strSettings;
	int		m_test_;
	CString	m_strSendString;
	//}}AFX_DATA

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

// Implementation
protected:
	afx_msg void OnCommMscomm();//定义映射函数
    DECLARE_EVENTSINK_MAP()//定义串口事件映射
// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMSCommDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtnClaer();
	afx_msg void OnBtnOpen();
	afx_msg void OnSelchangeCombo1();
	afx_msg void OnSelchangeCombo2();
	afx_msg void OnBtnSend();
	afx_msg void OnRadioSendtype();
	afx_msg void OnSendtype();
	afx_msg void OnBtnSetting();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_MSCOMMDLG_H__E31A04F3_8786_41ED_A584_A5690ACA7679__INCLUDED_)

⌨️ 快捷键说明

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