⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configview.h

📁 与LCD1602配套的上位机程序
💻 H
字号:
#if !defined(AFX_CONFIGVIEW_H__09CA432B_5DA1_4F4C_82CA_0C1BF7EF5A54__INCLUDED_)
#define AFX_CONFIGVIEW_H__09CA432B_5DA1_4F4C_82CA_0C1BF7EF5A54__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ConfigView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CConfigView form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif

#include "MainFrm.h"
#include "SerialPort.h"

class CConfigView : public CFormView
{
protected:
	CConfigView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CConfigView)

// Form Data
public:
	//{{AFX_DATA(CConfigView)
	enum { IDD = IDD_CONFIG };
	CStatic	m_MCSOnline;
	CEdit	m_EditManCom;
	CButton	m_AccCheck;
	CEdit	m_Sendtime;
	CButton	m_BtnComOpen;
	CButton	m_BtnComClose;
	CButton	m_BtnTimeSend;
	CButton	m_BtnManSend;
	CButton	m_BtnApply;
	CComboBox	m_ComStop;
	CComboBox	m_ComNum;
	CComboBox	m_ComData;
	CComboBox	m_ComCheck;
	CComboBox	m_ComBote;
	int m_nBaud;       //波特率
	int m_nCom;         //串口号
	char m_cParity;    //校验
	int m_nDatabits;    //数据位
	int m_nStopbits;    //停止位
	DWORD m_dwCommEvents;
	CString	m_strSendData;
	//}}AFX_DATA

// Attributes
public:

// Operations
public:
	CMainFrame * pMain;
	CSerialPort m_SerialPort;

	char HexChar(char c);
	int  Str2Hex(CString str, char* data);
	bool FindCommand(int Endbyte);
	bool ExecuteCommand(int Endbyte);
	bool SendCommand(CString str);
	
	short int ReciveData[1024],/*ReciveData2[1024],*/CommandData[1024];
	int  LastData;
	int  EndData;//,EndData2;
	bool processing;

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CConfigView)
	public:
	virtual void OnInitialUpdate();
	virtual BOOL DestroyWindow();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CConfigView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CConfigView)
	afx_msg void OnComopen();
	afx_msg void OnApply();
	afx_msg void OnComclose();
	afx_msg void OnLcdup();
	afx_msg void OnLcdDown();
	afx_msg void OnLcdLeft();
	afx_msg void OnLcdRight();
	afx_msg void OnLcdUp();
	afx_msg LONG OnComm(WPARAM ch,LPARAM port);
	afx_msg void OnSelendokComboBote();
	afx_msg void OnSelendokComboCheck();
	afx_msg void OnSelendokComboData();
	afx_msg void OnSelendokComboNum();
	afx_msg void OnSelendokComboStop();
	afx_msg void OnLcdDownAcc();
	afx_msg void OnLcdLeftAcc();
	afx_msg void OnLcdRightAcc();
	afx_msg void OnLcdUpAcc();
	afx_msg void OnMansend();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CONFIGVIEW_H__09CA432B_5DA1_4F4C_82CA_0C1BF7EF5A54__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -