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

📄 oscopectrl.h

📁 一个fir滤波器Designer的例子
💻 H
字号:
// OScopeCtrl.h : header file
//

#ifndef __OScopeCtrl_H__
#define __OScopeCtrl_H__

#define NUM_DECIMAL 1

/////////////////////////////////////////////////////////////////////////////
// COScopeCtrl window

class COScopeCtrl : public CWnd
{
	// Construction
public:
	COScopeCtrl();
	
	// Attributes
public:
	void	SetTitle(CString title);
	void	SetRangeX(int nMin,int nMax);
	void	SetRangeYA(int nMin,int nMax);
	void	SetRangeYB(int nMin,int nMax);
	void	SetData(int *data1,int *data2);
	void	SetGridColor(COLORREF color);
	void	SetBackColor(COLORREF color);
	void	InvalidateCtrl();
	void	DrawPoint();
	void	Reset();
	
	// Operations
public:
	
	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(COScopeCtrl)
public:
	virtual BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID=NULL);
	//}}AFX_VIRTUAL
	
	// Implementation
public:
	int  m_DataA[320],m_DataB[320];
	COLORREF m_crBackColor; 
	COLORREF m_crGridColor;
	COLORREF m_crLableColor;

	BOOL	m_bCover;
	BOOL	m_bIndication;
	BOOL	m_bMagnitude;
	BOOL	m_bPhase;
	
	virtual ~COScopeCtrl();
	
	// Generated message map functions
protected:
	//{{AFX_MSG(COScopeCtrl)
	afx_msg void OnPaint();
	afx_msg void OnSize(UINT nType, int cx, int cy); 
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
		
	int m_nClientHeight;
	int m_nClientWidth;

	int m_PrePos;
	
	CString  m_Title;
	
	int		m_XLower;
	int		m_XUpper;
	int		m_Y1Lower;
	int		m_Y1Upper;
	int		m_Y2Lower;
	int		m_Y2Upper;
	
	int		m_bXLable;
	int		m_bYLable;
	int		m_YPos;
	int		m_XPos;

	CRect	m_rectClient;
	CRect	m_rectWave;
	CPen	m_PenGrid;
	CPen	m_PenWave1;
	CPen	m_PenWave2;

	CDC     m_dcGrid;
	CDC     m_dcWave;
	CDC     m_dcWindow;
	CBitmap *m_pbitmapOldGrid;
	CBitmap *m_pbitmapOldWave;
	CBitmap *m_pbitmapOldWindow;
	CBitmap m_bitmapGrid;
	CBitmap m_bitmapWave;
	CBitmap m_bitmapWindow;
};

/////////////////////////////////////////////////////////////////////////////
#endif

⌨️ 快捷键说明

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