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

📄 oscopectrl.h

📁 VCsuishu fudai de yixie chengxuyuanma
💻 H
字号:
#if !defined(AFX_OSCOPECTRL_H__86EBE517_318D_4D10_A65A_1215CB563FEC__INCLUDED_)
#define AFX_OSCOPECTRL_H__86EBE517_318D_4D10_A65A_1215CB563FEC__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// COscopeCtrl window

class COscopeCtrl : public CWnd
{
// Construction
public:
	COscopeCtrl();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COscopeCtrl)
	public:
	virtual	BOOL COscopeCtrl::Create(CWnd* pParentWnd, UINT ctlID, UINT nID = NULL);
	//virtual BOOL Create( const RECT& rect, CWnd* pParentWnd, UINT nID = NULL);
	//}}AFX_VIRTUAL

// Implementation
public:
	double SetMsDiv(double dMsDiv);
	void Reset();
	BOOL GetRun(){return m_bRun;}
	void SetRun(BOOL bRun);
	void SetVdiv(double nVdiv);
	void DrawPoints();
	void AppendPoints(double dNewPoints[501]);//每次加入500点
	void SetPlotColor(COLORREF color);
	void SetGridColor(COLORREF color);
	void SetBackGroundColor(COLORREF color);
	void InvalidateCtrl();
	
	virtual ~COscopeCtrl();

	// Generated message map functions
protected:
	UINT m_ctlID;
	double m_dMsDiv;
	CRect m_rectGrid;
	BOOL m_bRun;
	double m_dVdiv;//Y轴  每一小格代表的**V数值(增益 V/div)
	double m_dCurrentPoints[501];
//	double m_dCurrentPosition;
	COLORREF m_clrPlot;
	CPen m_penPlot;//画曲线的笔
	CPen m_penGrid;//画格子的笔
	CBrush m_brushBk;//背景刷子
	COLORREF m_clrGrid;
	int m_nYdiv;//Y 轴 每一小格包含的逻辑单位
	int m_nXdiv;//X 轴 每一小格包含的逻辑单位
	COLORREF m_clrBk;
	CBitmap m_bitmapPlot;
	CBitmap m_bitmapGrid;
	CBitmap* m_pOldBitmapPlot;
	CBitmap* m_pOldBitmapGrid;
	CDC m_dcPlot;
	CDC m_dcGrid;
	int m_nPlotHeight;
	int m_nPlotWidth;
	CRect m_rectPlot;
	CRect m_rectClient;
	int m_nClientWidth;
	int m_nClientHeight;
	//{{AFX_MSG(COscopeCtrl)
	afx_msg void OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_OSCOPECTRL_H__86EBE517_318D_4D10_A65A_1215CB563FEC__INCLUDED_)

⌨️ 快捷键说明

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