📄 dtedlg.h
字号:
// DTEDlg.h : header file
//
#if !defined(AFX_DTEDLG_H__E5FE2829_2AF2_45CE_919F_27ED2B72C55C__INCLUDED_)
#define AFX_DTEDLG_H__E5FE2829_2AF2_45CE_919F_27ED2B72C55C__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CDTEDlg dialog
#include "SerialComm.h"
#include "INPUTLOCALIP.h"
//---------------------------------------
class CDTEDlg : public CDialog
{
// Construction
public:
CDTEDlg(CWnd* pParent = NULL); // standard constructor
CINPUTLOCALIP dlgLocalIP;
int m_isDebug;
unsigned int PacketID;
UserCodeType OwnUserCode;
unsigned int IDindex;
PktToNetIDTable IDTable[65536];
CString aStr;
// Dialog Data
//{{AFX_DATA(CDTEDlg)
enum { IDD = IDD_DTE_DIALOG };
CButton m_clearrecvbutton;
CRichEditCtrl m_recvedit;
CRichEditCtrl m_pktedit;
CButton m_sendbutton;
CComboBox m_pricombo;
CComboBox m_verifycombo;
CComboBox m_buatcombo;
CComboBox m_stopcombo;
CIPAddressCtrl m_IPADDRESS;
CButton m_serialbutton;
CComboBox m_datacombo;
CComboBox m_portcombo;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDTEDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CDTEDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSerialbutton();
afx_msg void OnLocalip();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnQuerylocalip();
afx_msg void OnPktnum();
afx_msg void OnMtu();
afx_msg void OnRoute();
afx_msg void OnEffecip();
afx_msg void OnTakeroute();
afx_msg void OnExitroute();
afx_msg void OnDebugopen();
afx_msg void OnUpdateDebugopen(CCmdUI* pCmdUI);
afx_msg void OnDebugoff();
afx_msg void OnUpdateDebugoff(CCmdUI* pCmdUI);
afx_msg void OnSendbutton();
afx_msg void OnClearrecvbutton();
//}}AFX_MSG
void DealDataFromPRU(unsigned char *recvbuffer);
DECLARE_MESSAGE_MAP()
};
void InvalidateHandle(HANDLE &hHandle);//引用的方式
void CloseAndCleanHandle(HANDLE &hHandle);
//打开串口
BOOL OpenConnection(CString szPortName, DWORD dwBaudRate, BYTE byByteSize,
CString byParity, CString byStopBit);
//关闭串口
BOOL CloseConnection();
//串口是否打开
BOOL IsConnection();
void Init();
void ENDSerial();
void WRITEProtocol(HANDLE &HComm, const unsigned char *data, DWORD size);
void SerialWriteData(HANDLE &HComm, const unsigned char *msg, DWORD dwSize);
//初始化一些变量
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DTEDLG_H__E5FE2829_2AF2_45CE_919F_27ED2B72C55C__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -