📄 serialportdlg.h
字号:
// SerialPortDlg.h : header file
//
#if !defined(AFX_SERIALPORTDLG_H__52641353_2219_4292_8B66_04268A353CEF__INCLUDED_)
#define AFX_SERIALPORTDLG_H__52641353_2219_4292_8B66_04268A353CEF__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "PSerialPort.h"
/////////////////////////////////////////////////////////////////////////////
// CSerialPortDlg dialog
class CSerialPortDlg : public CDialog
{
// Construction
public:
CSerialPortDlg(CWnd* pParent = NULL); // standard constructor
BOOL SaveReceivedToFile(LPCTSTR FileName);
private:
//变量
BOOL Open;
BOOL Receive;
int PortNo,BaudRate,DataBits,StopBits,Parity;
CString PortID,PortIDs[9];
int BaudRates[8];
BOOL HexDisplay,HexSend;
//串口类变量
CPSerialPort* m_pSerial;
CString m_strDataReceived;
static void OnDataArrive(char *data,int length,DWORD userdata);
// Dialog Data
//{{AFX_DATA(CSerialPortDlg)
enum { IDD = IDD_SERIALPORT_DIALOG };
CEdit m_CtrlReceive;
CString m_strReceive;
CString m_strTransmit;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSerialPortDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CSerialPortDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSetup();
afx_msg void OnOpen();
afx_msg void OnClearRece();
afx_msg void OnClearSend();
afx_msg void OnRece();
afx_msg void OnSend();
afx_msg void OnDestroy();
afx_msg void OnCheckHex();
afx_msg void OnSendFile();
afx_msg void OnSaveReceived();
afx_msg void OnCheckHexSend();
afx_msg void OnDataArrivedMsg(WPARAM wParam,LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SERIALPORTDLG_H__52641353_2219_4292_8B66_04268A353CEF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -