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

📄 cetools.h

📁 串口通讯演示程序
💻 H
字号:
// CeTools.h : main header file for the CETOOLS application
//

#if !defined(AFX_CETOOLS_H__859C852E_13E1_400E_9483_0910C10F47E4__INCLUDED_)
#define AFX_CETOOLS_H__859C852E_13E1_400E_9483_0910C10F47E4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CCeToolsApp:
// See CeTools.cpp for the implementation of this class
//

class CCeToolsApp : public CWinApp
{
public:
	CCeToolsApp();

	float ExpErrRate(int Err,int All);
	int FlagCharToBuf(CString sStr, CString *dStr);
	int PortState;
	int CurRevType;
	struct SetParam_struct
	{
		int PortNo;
		int Baud;
		int Modified;
	};
	SetParam_struct SetParam;
	HWND m_hWnd;
	int BmState;//1:使用编码
	struct ErrCode_Str
	{
		DWORD CommTotalLen;//串口收到的总数
		DWORD TotalLen;//收到的总数
		DWORD ErrLen;//错误数
		float ErrCodeRate;
		int run;//是否运行
	};
	ErrCode_Str ErrCodeRate;//每秒
	ErrCode_Str ErrCodeRate2;
	ErrCode_Str ErrCodeRate_m;//每分
	ErrCode_Str ErrCodeRate2_m;
	ErrCode_Str ErrCodeRate_t;//累计
	ErrCode_Str ErrCodeRate2_t;
	struct VData_Str
	{
		CString ViewData;
		int Enable;//1:可以访问
		int DataFlag;//1:有数据
	};
	VData_Str ViewDataStr[2];
	VData_Str ViewDataStr2[2];
	DWORD BufferDataLen;
	int ShowSel;//0:所有,1:A通道,2:B通道
	DWORD TotalRunTime;//显示累计运行时间
	BOOL RunNT;

	CHARFORMAT cf;
	LOGFONT logfont;
	COLORREF colorref_rev;
	COLORREF colorref_back;
	long FlagCharColor;//关键字颜色
	int FlagCharNum;//关键字个数
	CString FlagChar[100];//关键字

	struct Line_Color
	{
		long ErrRateColA;
		long ErrRateColB;
		long DataColA;
		long DataColB;
		long NoDataCol;
		long FlagCol;
		long CursorCol;
	};
	Line_Color LineColor;
	int ShowMouseFlag;

	TCHAR AppPathName[MAX_PATH]; 
private:
	void GetAppName(TCHAR *AppPath);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCeToolsApp)
	public:
	virtual BOOL InitInstance();
	virtual int Run();
	virtual BOOL InitApplication();
	//}}AFX_VIRTUAL

// Implementation
	//{{AFX_MSG(CCeToolsApp)
	afx_msg void OnAppAbout();
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


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

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

#endif // !defined(AFX_CETOOLS_H__859C852E_13E1_400E_9483_0910C10F47E4__INCLUDED_)

⌨️ 快捷键说明

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