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

📄 scope.h

📁 通过串口读取单片机传输的电压
💻 H
字号:
#if !defined(AFX_SCOPE_H__464C812B_8294_4EF4_A480_09D95F25DF8C__INCLUDED_)
#define AFX_SCOPE_H__464C812B_8294_4EF4_A480_09D95F25DF8C__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// Cscope window

class Cscope : public CStatic
{
// Construction
public:
	Cscope();
	void SetVale(float xx);
	void SetMaxKD(int x,int y);			//设置XY的刻度最大值
	void SetValueColor(COLORREF clr);	//设置曲线颜色
	void SetBackColor(COLORREF clr);	//设置背景颜色
	void SetkdColor(COLORREF clr);		//设置刻度颜色malkdColor
	void SetmalkdColor(COLORREF clr);	//设置小刻度颜色
// Attributes
public:

// Operations
public:

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

// Implementation
public:	
	
	virtual ~Cscope();
	
	// Generated message map functions
protected:
	float fData[1024];
	void Drawkd(CDC *pDC);					//画刻度
	void DrawVale(CDC *pDC);				//画曲线
	int oldx,oldy;							//用于保存上一步的坐标
	int valuejs;							//画线计数
	int value;								//当前画线的值
	int wzx,wzy,wzwith,wzright;				//控件的位置及宽度高度
	int m_penWidth;							//曲线高度
	int m_MaxX,m_MaxY;//XY最大值
	CRect		m_controlRect;				//这个控件的客户区矩形
	COLORREF	m_ValueColor;				//数字的颜色
	COLORREF	m_BackColor;				//控件背景颜色
	COLORREF    m_LineColor;					//刻度颜色
	COLORREF    m_malkdColor;				//小刻度颜色
	//{{AFX_MSG(Cscope)
	afx_msg void OnPaint();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_SCOPE_H__464C812B_8294_4EF4_A480_09D95F25DF8C__INCLUDED_)

⌨️ 快捷键说明

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