📄 modbustooldlg.h
字号:
// ModBusToolDlg.h : header file
//
#if !defined(AFX_MODBUSTOOLDLG_H__BC940809_702B_4482_8B19_397EE4FF2805__INCLUDED_)
#define AFX_MODBUSTOOLDLG_H__BC940809_702B_4482_8B19_397EE4FF2805__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "BTNST.h"
#include "NewComThread.h"
#include "NewConVert.h"
/////////////////////////////////////////////////////////////////////////////
// CModBusToolDlg dialog
//class CNewComThread;
class CModBusToolDlg : public CDialog
{
public:
CButtonST m_bmpButton[3];
CButton *m_Button[3];
HICON m_nIcon[2];
CStatic *m_Picture;
CStatic *m_Status;
CStatic *m_Line;
CEdit *m_Edit[2];
//CRichEditCtrl*lpEdit;
BOOL m_SizeFlag;
CString pszStatus;
BYTE byPort;
DWORD dwBaud;
UINT uiTerm;
UINT uiInterval;
BOOL blMode;
BOOL blNotCrc;
INT intRX,intTX;
DWORD dwSetValue;
unsigned char sendByte[100];
CComboBox *m_ComPort;
CComboBox *m_ComBaud;
CComboBox *m_Command;
CComboBox *m_ComMachine;
CComboBox *m_TimeInterval;
CButton *m_CheckCrc;
CButton *m_CheckNotCrc;
CButton *m_CheckMode;
CButton *m_CheckAutoReceive;
CButton *m_CheckWriteRam;
CButton *m_butSetDataTo;
CButton *m_butPort;
CEdit *m_editData;
void Initailize_Window( CDC *pDc );
void Initailize_Control();
void Receive_Data();
int Str2Hex(CString str, unsigned char* data);
char HexChar( char c );
BOOL Change_Communication_Param();
void Change_Work_Status( BOOL blTrue = TRUE );
CString Get_CRC_Data();
BOOL Get_Last_CRC_Data( CString pszData );
BOOL Send_TextData( CString pszstring );
CNewComThread *lpNewComThread;
CNewConVert lpNewConVert;
public:
CModBusToolDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CModBusToolDlg)
enum { IDD = IDD_MODBUSTOOL_DIALOG };
DWORD m_EditData;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CModBusToolDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CModBusToolDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnClose();
afx_msg void OnEnter();
afx_msg void OnExit();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnClear();
afx_msg void OnSelchangeComboCommand();
afx_msg void OnSelchangeComboComport();
afx_msg void OnSelchangeComboBaud();
afx_msg void OnSelchangeComboMachine();
afx_msg void OnSelchangeComboInterval();
afx_msg void OnCheckMode();
afx_msg void OnCheckNotcrc();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnCheckAutoreceive();
afx_msg void OnButsetdatato();
afx_msg void OnButComport();
afx_msg void OnButConvent();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MODBUSTOOLDLG_H__BC940809_702B_4482_8B19_397EE4FF2805__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -