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

📄 fileterview.h

📁 这个我写的一个计算LC滤波器的程序
💻 H
字号:
// FileterView.h : interface of the CFileterView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_FILETERVIEW_H__0B4F9D8C_8CC5_11D4_A754_A60657063E7D__INCLUDED_)
#define AFX_FILETERVIEW_H__0B4F9D8C_8CC5_11D4_A754_A60657063E7D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Filter_Struct.h"
#include "Compnent.h"
#include "LPF.h"

class CFileterView : public CScrollView
{
protected: // create from serialization only
	CFileterView();
	DECLARE_DYNCREATE(CFileterView)

// Attributes
public:
	CFileterDoc* GetDocument();
//
	CComplex_num Is;//(100,0);//声明输入电流

	int FilterClass;
	int FilterType;
	CCCompnent *pCC;
	CLCompnent *pLC;
	CLPF *pViewFilter;
//	CCauerLPF *pViewFilter;

	double BegindB;
	double EnddB;
	double BeginF;
	double EndF;
	double MaxdB,MindB;
	double MaxF,MinF;
//画的范围和客户范围
	CRect m_DrawRect;
    CRect m_ClientRect;
//mouse operate
	int m_Moving;//LB Had Dwon
	CPoint m_OrgPos;
	CPoint m_OldPos;
	HCURSOR m_hCursor,PreCursor;
//comp
	BOOL m_Comp;
//block word
	CDC memDC;
	CSize m_OrgPtSize, m_MovPtSize;
	int m_Distance;
	int Runtimes;
//Invert
	BOOL m_Invert;
//add AND SUBB
	int m_Who;//where is edit
// Operations
public:

	void DrawInit(CDC *pDC);
	void DrawResonance(CDC *pDC);
	void DrawAmp(CDC *pDC);
    void UpdateViewFilter(int fClass,int fType,double f1,double f2,double rl);

// from x, y get F and dB
	double GetF(int x);
	double GetdB(int y);
// from f db get x, y
	int GetX(double f);
	int GetY(double db);
//block operation
	void GetBlock(int x,int y);
	void PutBlock(int x,int y);
	void WriteWord(int x,int y);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFileterView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CFileterView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CFileterView)
	afx_msg void OnSetValue();
	afx_msg void OnSetFdb();
	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 void OnRButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnSetDbtype();
	afx_msg void OnUpdateSetDbtype(CCmdUI* pCmdUI);
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnSelectC1();
	afx_msg void OnUpdateSelectC1(CCmdUI* pCmdUI);
	afx_msg void OnSelectC2();
	afx_msg void OnUpdateSelectC2(CCmdUI* pCmdUI);
	afx_msg void OnSelectC3();
	afx_msg void OnUpdateSelectC3(CCmdUI* pCmdUI);
	afx_msg void OnSelectC4();
	afx_msg void OnUpdateSelectC4(CCmdUI* pCmdUI);
	afx_msg void OnSelectC5();
	afx_msg void OnUpdateSelectC5(CCmdUI* pCmdUI);
	afx_msg void OnSelectL2();
	afx_msg void OnUpdateSelectL2(CCmdUI* pCmdUI);
	afx_msg void OnSelectR2();
	afx_msg void OnUpdateSelectR2(CCmdUI* pCmdUI);
	afx_msg void OnSelectL4();
	afx_msg void OnUpdateSelectL4(CCmdUI* pCmdUI);
	afx_msg void OnSelectRl();
	afx_msg void OnUpdateSelectRl(CCmdUI* pCmdUI);
	afx_msg void OnSelectR4();
	afx_msg void OnUpdateSelectR4(CCmdUI* pCmdUI);
	afx_msg void OnSetAdd();
	afx_msg void OnUpdateSetAdd(CCmdUI* pCmdUI);
	afx_msg void OnSetSub();
	afx_msg void OnUpdateSetSub(CCmdUI* pCmdUI);
	afx_msg void OnSetReturn();
	afx_msg void OnSetClass();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in FileterView.cpp
inline CFileterDoc* CFileterView::GetDocument()
   { return (CFileterDoc*)m_pDocument; }
#endif

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

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

#endif // !defined(AFX_FILETERVIEW_H__0B4F9D8C_8CC5_11D4_A754_A60657063E7D__INCLUDED_)

⌨️ 快捷键说明

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