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

📄 commtestdlg.h

📁 是一种VC的串口调试代码的下位机是以十位的数据帧发送数据 上位机是以VB编程序的 十位的数据帧包括1位起首位+8位数据位+一位停止位
💻 H
字号:
// commtestDlg.h : header file
//

#if !defined(AFX_COMMTESTDLG_H__094EF006_CBE0_11D7_B4F9_00E04C74763F__INCLUDED_)
#define AFX_COMMTESTDLG_H__094EF006_CBE0_11D7_B4F9_00E04C74763F__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CCommtestDlg dialog

class CCommtestDlg : public CDialog
{
// Construction
public:
	long m_rxlen;
	long m_txlen;
	void DispStatus();
	void CloseConnection();
	BOOL ProcessCOMMNotification (UINT wParam,long lParam);
	BOOL m_portstatu_but;
	BOOL m_bAutoSend;
	char ConvertHexData(char ch);
	int String2Hex(CString str, char *SendOut);
	int WriteBlock(char *abOut,int MaxLength);
	int ReadBlock(BYTE *abIn,int MaxLength);
	volatile int m_bConnected;
	BOOL OpenComm(int Num);
	BOOL SetCommParameter();
	HANDLE m_hCom;
	CWinThread *m_pThread;
//	volatile HANDLE m_hPostMsgEvent;
//	volatile HWND hPostToWnd;
	OVERLAPPED m_osRead,m_osWrite; 
	CCommtestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CCommtestDlg)
	enum { IDD = IDD_COMMTEST_DIALOG };
	CButton	m_emptyrx;
	CStatic	m_filename;
	CButton	m_cHexSend;
	CButton	m_emptytx;
	CButton	m_transfile;
	CButton	m_sendbutten;
	CEdit	m_edittxdata;
	CStatic	m_sFilePath;
	CEdit	m_EditRXData;
	CButton	m_ctrlHexDisplay;
	CButton	m_judgesend;
	CComboBox	m_ComboStop;
	CComboBox	m_ComboJiaoyan;
	CComboBox	m_ComboData;
	CComboBox	m_ComboBaud;
	CComboBox	m_ComboSeriou;
	CString	m_SeriouStr;
	CString	m_BaudStr;
	CString	m_StopStr;
	CString	m_savefilename;
	CString	m_strTXData;
	CString	m_filepath;
	CString	m_strRXData;
	CString	m_JiaoyanStr;
	CString	m_DataStr;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CCommtestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSelchangeComboSeriou();
	afx_msg void OnButtenMenualsend();
	afx_msg void OnButtonTransfile();
	afx_msg void OnCheckAutosend();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButtonEmptytext();
	afx_msg void OnCheckWritetofile();
	afx_msg void OnButtonFilename();
	afx_msg void OnButtonSaveedit();
	afx_msg void OnButtonEmptyrx();
	afx_msg void OnButtonPortstatu();
	afx_msg void OnButtonClose();
	afx_msg void OnSelchangeComboBaud();
	afx_msg void OnSelchangeComboData();
	afx_msg void OnSelchangeComboJiaoyan();
	afx_msg void OnSelchangeComboStop();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnButtonReset();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	void addall();
};

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

#endif // !defined(AFX_COMMTESTDLG_H__094EF006_CBE0_11D7_B4F9_00E04C74763F__INCLUDED_)

⌨️ 快捷键说明

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