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

📄 comtestdlg.h

📁 刚学RS232时,仿串口测试工具界面,做的一个串口测试小软件.
💻 H
字号:
// ComTestDlg.h : header file
//

#if !defined(AFX_COMTESTDLG_H__025CD921_D74E_4604_A72D_AD1ADCDFA933__INCLUDED_)
#define AFX_COMTESTDLG_H__025CD921_D74E_4604_A72D_AD1ADCDFA933__INCLUDED_

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

void ThreadFunc(LPVOID lpParam);

/////////////////////////////////////////////////////////////////////////////
// CComTestDlg dialog

class CComTestDlg : public CDialog
{
// Construction
public:
	CComTestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CComTestDlg)
	enum { IDD = IDD_COMTEST_DIALOG };
	CEdit	m_sendPath;
	CEdit	m_in;
	CButton	m_view;
	CButton	m_portSet;
	CComboBox	m_stopBits;
	CComboBox	m_port;
	CComboBox	m_byetSize;
	CComboBox	m_baudRate;
	CComboBox	m_parity;
	BOOL	m_16in;
	CString	m_savePath;
	BOOL	m_clearIn;
	int		m_cycle;
	CString	m_out;
	BOOL	m_autoSend;
	BOOL	m_16out;
	//}}AFX_DATA

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

// Attributes
public:
	CStatusBarCtrl	m_StatusBar;
	cnComm			m_com;
	BOOL			m_bflag;
	UINT			m_RxCount;
	UINT			m_TxCount;
	HANDLE			m_hThread;
	DWORD			m_threadID;

// Operations
public:
	BOOL SelectFolder(HWND hParent, CString &strFolder);
	void Hex2Char(char const* szHex, UCHAR& rch);
	void HexStr2CharStr(char const* pszHexStr, UCHAR* pucCharStr, int iSize);

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CComTestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButtonStopview();
	afx_msg LRESULT OnComRecv(WPARAM wParam, LPARAM lParam);
	afx_msg void OnButtonPort();
	afx_msg void OnButtonClear();
	afx_msg void OnButtonSave();
	afx_msg void OnCheckClearin();
	afx_msg void OnButtonSavepath();
	afx_msg void OnButtonClearout();
	afx_msg void OnCheckAutosend();
	afx_msg void OnChangeEditOut();
	afx_msg void OnChangeEditCycle();
	afx_msg void OnButtonSend();
	afx_msg void OnButtonSelect();
	afx_msg void OnButtonSendfile();
	afx_msg void OnButtonReset();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_COMTESTDLG_H__025CD921_D74E_4604_A72D_AD1ADCDFA933__INCLUDED_)

⌨️ 快捷键说明

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