📄 scommtestdlg.h
字号:
// SCommTestDlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
#include "DialogEdit.h"
#include "StaticTop.h"
//}}AFX_INCLUDES
#if !defined(AFX_SCOMMTESTDLG_H__E6B50E75_0245_4A42_BADF_9EEF5A6D4AC4__INCLUDED_)
#define AFX_SCOMMTESTDLG_H__E6B50E75_0245_4A42_BADF_9EEF5A6D4AC4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CSCommTestDlg dialog
class CSCommTestDlg : public CDialog
{
DECLARE_SERIAL(CSCommTestDlg)
// Construction
public:
CPoint m_ptMinTrackSize;
void UpdateGripPos();
CToolTipCtrl m_ToolTips;
void LeftRightNoChang(int id, int cx, int cy);
virtual void LeftNoChang(int id,int cx,int cy);
virtual void AllRectParaChange(int id ,int cx, int cy);
int m_RepaintCount;
CString m_strOldComID;
CString m_strComID;
int RXStatus;
int TXStatus;
int m_iSentFilesCount;
void SendFileData(CString str);
BOOL bTopCounter;
int m_iPrimComID;//每次改变ComID之前的序号(从0开始)
void ChangeIcon(CStatic &ctrlHandle,LPCTSTR IconID);
void ChangeIcon(CWnd* ctrlHandle,LPCTSTR IconID);
BOOL m_hIconCounter;
virtual void ChangeIcon(CWnd ctrlHandle,LPCTSTR IconID);
CString m_strComPara;
int ComID;//实际的串口号
CString XiaoYan;
CString StopBit;
CString BoRate;
CString BitNumber;
BOOL ChangeComSet(int comID,CString str);
void GetCurrentTime();
// BOOL m_bAutoSend;
char ConvertHexChar(char ch);
int String2Hex(CString str,CByteArray &senddata);
CSCommTestDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CSCommTestDlg)
enum { IDD = IDD_SCOMMTEST_DIALOG };
CDialogEdit m_ctrlCatalog;
CStaticTop m_ctrlStaticTop;
CDialogEdit m_ctrlExchangeData;
CStatic m_ctrlOpenOrClose;
CStatic m_ctrlCurTime;
CButton m_ctrlAutoDel;
CEdit m_ctrlRxDataIsFull;
CButton m_ctrlCloseCom;
CButton m_ctrlStopDisplay;
CComboBox m_ctrlXiaoYan;
CComboBox m_ctrlBitNumber;
CComboBox m_ctrlBoRate;
CComboBox m_ctrlStopBit;
CComboBox m_ctrlComID;
CButton m_ctrlAutoSend;
CButton m_ctrlHexDisplay;
CButton m_ctrlHexSend;
CMSComm m_ctrlComm;
CString m_strRXData;
CString m_strTXData;
BOOL m_bAutoDel;
CString m_strCurTime;
int m_iAutoSendTime;
CString m_strCatalog;
CString m_strTXCount;
CString m_strRXCount;
CString m_strComStatus;
CString m_strSavePath;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSCommTestDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void CalcWindowRect(LPRECT lpClientRect, UINT nAdjustType = adjustBorder);
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
protected:
CString m_sEntry;
CString m_sSection;
void LoadWindowRect();
void SaveWindowRect();
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
afx_msg UINT OnNcHitTest(CPoint point);
CBitmap m_bmpBitmap;
CRect m_bitmapRect;
long m_lOriginalX;
long m_lOriginalY;
long m_lOriginalX1;
long m_lOriginalY1;
long m_lOriginal1Left;
long m_lOriginal1Right;
long m_lOriginal1Top;
long m_lOriginal1Bottom;
long m_lOriginal2Right;
long m_lOriginal2Bottom;
long m_lDlgLeft;
long m_lDlgRight;
long m_lDlgTop;
long m_lDlgBottom;
CRect rect;
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CSCommTestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnComm();
afx_msg void OnButtonManualsend();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnCheckAutosend();
afx_msg void OnChangeEditAutosendtime();
afx_msg void OnSelchangeComboComid();
afx_msg void OnSelchangeComboBitnumber();
afx_msg void OnSelchangeComboBorate();
afx_msg void OnSelchangeComboStopbit();
afx_msg void OnSelchangeComboXiaoyan();
afx_msg void OnDelRxdata();
afx_msg void OnDelTxdata();
afx_msg void OnStopdisplay();
afx_msg void OnClosecom();
afx_msg void OnCheckAutodel();
afx_msg void OnChangeRxdata();
afx_msg void OnStaticTop();
afx_msg void OnLoadfile();
afx_msg void OnSendfile();
afx_msg void OnDelRxTxcount();
afx_msg void OnChangeSavePath();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnDestroy();
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
BOOL m_bInitDone;
CRect m_rcGripRect;
CSize m_szGripSize;
CFont m_TxDataFont;
int m_iCloseComCounter;
int m_iCounter;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SCOMMTESTDLG_H__E6B50E75_0245_4A42_BADF_9EEF5A6D4AC4__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -