www.pudn.com > Comtestdlg.rar > ComtestDlg.h
// ComtestDlg.h : header file
//
//{{AFX_INCLUDES()
#include "mscomm.h"
//}}AFX_INCLUDES
#if !defined(AFX_COMTESTDLG_H__C5159487_C2D4_11D7_8AA2_000AEB0A4427__INCLUDED_)
#define AFX_COMTESTDLG_H__C5159487_C2D4_11D7_8AA2_000AEB0A4427__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "HyperLink.h" //超键接效果的Static类
/////////////////////////////////////////////////////////////////////////////
// CComtestDlg dialog
#include "AnimateIcon.h"
class CComtestDlg : public CDialog
{
DECLARE_EASYSIZE //一组宏完成对话框resize后控件位置和大小
// Construction
public:
CBitmap m_bmpLedOff;
CBitmap m_bmpLedOn;
char ConvertHexChar(char ch);
int String2Hex(CString str, CByteArray &senddata);
CComtestDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CComtestDlg)
enum { IDD = IDD_COMTEST_DIALOG };
CStatic m_ctrlComLed;
CEdit m_ctrlComStatus;
CEdit m_ctrlRxData;
CButton m_ctrlComctl;
CButton m_ctrlHexDisplay;
CButton m_ctrlHexSend;
CString m_strRXData;
CString m_strTXData;
CMSComm m_ctrlComm;
BOOL m_bAutoSend;
int m_nCom; //串口
int m_nBtl; //波特率
int m_nSgw; //数据位
int m_nStopb; //停止位
int m_nXyw; //校验位
int m_nSendTime;
CString m_strComStatus;
CString m_strRxCount;
CString m_strTxCount;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CComtestDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
CAnimateIcon m_animIcon; //会动图标对象
UINT m_timerID; //
int m_nSBtl; //波特率
char m_cSXyw; //校验位
int m_nSSgw; //数据位
int m_nSStopb; //停止位
// 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 OnTimer(UINT nIDEvent);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnButtonManualsend();
afx_msg void OnComm();
afx_msg void OnAutosend();
afx_msg void OnSelchangeSetcom();
afx_msg void OnSelchangeSetbtl();
afx_msg void OnSelchangeSetsgw();
afx_msg void OnSelchangeSetstopb();
afx_msg void OnSelchangeSetxyw();
afx_msg void OnUpdateSendtime();
afx_msg void OnCtrlCom();
afx_msg void OnRescount();
afx_msg void OnClearrxdata();
afx_msg void OnCleartxdata();
afx_msg void OnOpensendfile();
afx_msg void OnSavedata();
afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
int m_nTxCount; //发送计数
int m_nRxCount; //接收计数
void UpdataStatus();
BOOL m_bCtrlCom;
void ChangeCom();
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_COMTESTDLG_H__C5159487_C2D4_11D7_8AA2_000AEB0A4427__INCLUDED_)