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

📄 scope.h

📁 一个用VC++6.0编写的随机数生成器
💻 H
字号:
#if !defined(AFX_SCOPE_H__68BC64BC_1E65_46CC_803B_D2985E840788__INCLUDED_)
#define AFX_SCOPE_H__68BC64BC_1E65_46CC_803B_D2985E840788__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// Scope window
#include <list>
#include <iterator>


class Scope : public CStatic
{
// Construction
public:
	Scope();

// Attributes
public:

// Operations
public:

	void SetTitle(CString strTitle);
	void SetValue(double dValue);
	void SetValueString(CString strTitle,CString strUnit);
	void SetDimT(double newDimT);
	void SetDimy(double newDimY);
	void SetBase(int nNewABase,int nRange);
	void UpdateCurve();
	void AddValue(double dTime,double dValue);
	void Clear();
	
	
private:
	int ConvertTimeToAxisX(double dTime);
	int ConvertValueToAxisY(double dValue);
	void DrawValue(CDC *pDC);
	void DrawValuePanel(CDC *pDC);
	void DrawTitle(CDC *pDC);
	void DrawCurvePanel(CDC *pDC);
	void DrawGrid(CDC *pDC);
	void DrawCurve(CDC *pDC);
	void DrawAxis(CDC *pDC);
	void DrawTrack(CDC *pDC,BOOL bPressed);
	void DrawArrow(CDC *pDC,int nIndex,BOOL bLighted);
private:
	CRect	m_rectCurve;
	CRect	m_rectValue;
	CRect   m_rectCurvePanel;
	CRect   m_rectValuePanel;
	CRect   m_rectScroll;

	CRgn	m_rgnCurve;
	CRgn	m_rgnYPlus;
	CRgn	m_rgnYMinus;
	CRgn	m_rgnTPlus;
	CRgn	m_rgnTMinus;
    

	
	CBrush  m_BkBrush;
	CBrush  m_PanelBrush;
	CBrush  m_CurveBrush;

	CPen    m_PenCurve;
	CPen    m_PenGrid;
	CPen    m_PenBrightLine;
	CPen    m_PenDarkLine;

	CFont   m_FontTitle;
	CFont   m_FontValue;
	CFont   m_FontAxis;
	CFont   m_FontLabel;
	   
	double  m_dDimT;
	double  m_dDimY;
	double  m_dValue;

	int		m_nBase;
	int		m_nRange;
	int     m_nArrowIndex;
	BOOL    m_bPressed ;

	BOOL	m_bDrawing;

	CBitmap m_bitmapTitle;
	CBitmap m_bitmapTrack;


	CString m_strTitle;
	CString m_strValueName;
	CString m_strUnitName;
	std::list<double> m_TimeList;
	std::list<double> m_ValueList;





// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(Scope)
	protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~Scope();

	// Generated message map functions
protected:
	//{{AFX_MSG(Scope)
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg UINT OnNcHitTest(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__68BC64BC_1E65_46CC_803B_D2985E840788__INCLUDED_)

⌨️ 快捷键说明

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