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

📄 comdebugdlg.h

📁 串口通信程序,适用于手机的软件更新
💻 H
字号:
// ComDemoDlg.h : header file
//

#if !defined(AFX_COMDEMODLG_H__BF6BFA02_94F9_400A_BE23_23366B2F8DCD__INCLUDED_)
#define AFX_COMDEMODLG_H__BF6BFA02_94F9_400A_BE23_23366B2F8DCD__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CComDebugDlg dialog
#include "SerialPort.h"

class CComDebugDlg : public CDialog
{
private:
	CString m_szReceivedText;
	BOOL	m_bInitComOk;
	BOOL	m_bUninterrupted;
	DWORD	m_dwSendInterval;
private:
	BOOL IsSleepTime(CString szText, int &nTime);
	void InitPara(void);
	BOOL IsString(CString szCmd);
	BOOL IsASCII(CString szCmd, char &ch);
	void SendData(CString szData);
	void LoadCmdFile(CString szFileName);
	void InitComboBox(void);
	CSerialPort m_SerialPort;
	BOOL GetCharFromHexString(CString szHex, char &ch, WORD &wValue, int &nType);
// Construction
public:
	CComDebugDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CComDebugDlg)
	enum { IDD = IDD_COMDEMO_DIALOG };
	CButton	m_che;
	CEdit	m_Stase;
	CEdit	m_Imei;
	CComboBox	m_Type;
	CColorButton	m_btnSetCom;
	CColorButton	m_btnSend;
	CColorButton	m_btnSave;
	CColorButton	m_btnBrowse;
	CEdit	m_edtSendedData;
	CEdit	m_edtReceivedData;
	CEdit	m_edtSendData;
	CComboBox	m_comboStopBits;
	CComboBox	m_comboParity;
	CComboBox	m_comboByteSize;
	CComboBox	m_comboBaudRate;
	CComboBox	m_comboComPort;
	BOOL	m_Band;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CComDebugDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnDestroy();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnBtnBrowse();
	afx_msg void OnBtnSend();
	afx_msg void OnBtnSetcom();
	afx_msg void OnChk16();
	afx_msg void OnBtnSave();
	afx_msg void OnChkUninterrupted();
	afx_msg void OnClose();
	afx_msg void OnChangeEditSendinterval();
	//}}AFX_MSG
	LRESULT OnGetDefID(WPARAM wParam, LPARAM lParam); 
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_COMDEMODLG_H__BF6BFA02_94F9_400A_BE23_23366B2F8DCD__INCLUDED_)

⌨️ 快捷键说明

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