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

📄 myscroll02.h

📁 温度测量系统的上位机程序 呵呵
💻 H
字号:
#if !defined(AFX_MYSCROLL02_H__CEF63195_8308_4965_B8D3_F0822278661B__INCLUDED_)
#define AFX_MYSCROLL02_H__CEF63195_8308_4965_B8D3_F0822278661B__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// MyScroll02 window

class CMyScroll02 : public CStatic
{
// Construction
public:
	CMyScroll02();
	void InitDrawBk();			//////初始化显示,即只画背景而不动动态的曲线
	void SetScrollPoint(int y);	//////设当前新加点的Y轴坐标
	
	/////////////////////////////以下函数用于显示的设置
	void SetBkMapColor(COLORREF BkColor);	///////设置背景色
	void SetNetLineColor(COLORREF LineColor);//////设置网络线的颜色
	void SetNetLine(int x,int y);			///////设置背景的网格线的数目
	void SetScrollColor(COLORREF ScrollColor);///////设置曲线的颜色
	void SetNumberX(int x);					///////设置X轴的采样点数
	void IsShowNetLine(BOOL isShowNetLine);	///////设置是否显示网络线

	void SetNumberY(int Y_Hig,int Y_Low);	//设置Y轴上的点数,第一个参数为正象限的点数
											//第二个参数为负象限的点数,最好设置整数
	void SetUpdateFlag(BOOL BTemp);

protected:

	void PrepareDC();			////////准备DC设备
	void BeginDrawBk();			//////用于画背景的函数,可供其它类调用,以用于初始化
	void DrawBkLine();			///////画背景的网格线
	void DrawScroll();			///////画曲线
	
	void OnPrepareDC(CDC *dc);
// Attributes
public:

// Operations

protected:
	CDC *pDC;					/////CDC设备
	CDC *pDC_B;
	COLORREF m_BkColor;			/////用于背景色的设置
	COLORREF m_NLColor;			/////用于网络线的颜色设置
	COLORREF m_SColor;			/////第n路曲线的颜色

	int m_NumNetLineX;			/////X轴中网格线的数目
	int m_NumNetLineY;			/////Y轴中网格线的数目

	int m_NumberX;				/////X轴中的采样点数,初始化为500,且最大为500个点
	int m_NumberY;
	int m_NumberY_Hig;			//Y轴的正数点数!
	int m_NumberY_Low;			//Y轴的负数点数
	BOOL m_isFirst;				/////是否为第一帧
	BOOL m_isInitial;			//标识是否经过初始化
	BOOL m_isShowNetLine;		//////是否显示网格线
	BOOL m_isUpdateView;		//////是否允许刷新显示
	int m_iUpdateFreq;			//////设置刷新频率嘀

	CPoint m_pMapPoint[501];	/////用于存放曲线的各点的坐标的,共八路,每一路最大为500个点
	
	long m_nBeginMapPoint;		/////用于标识当前开始画的点是哪个点
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyScroll02)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CMyScroll02();

	// Generated message map functions
protected:
	//{{AFX_MSG(CMyScroll02)
	afx_msg void OnPaint();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_MYSCROLL02_H__CEF63195_8308_4965_B8D3_F0822278661B__INCLUDED_)

⌨️ 快捷键说明

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