📄 滤波器设计dlg.h
字号:
// 滤波器设计Dlg.h : header file
//
#if !defined(AFX_DLG_H__6EB7ED7D_C9C0_451E_9CBE_0005819980C4__INCLUDED_)
#define AFX_DLG_H__6EB7ED7D_C9C0_451E_9CBE_0005819980C4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMyDlg dialog
class CMyDlg : public CDialog
{
// Construction
public:
CMyDlg(CWnd* pParent = NULL); // standard constructor
void DrawScaleText(HDC hdc,int xfrom1, int xto1, int yfrom1, int yto1, int ycenter1);
void draworiginalwave(HDC hdc, double sf,double sa,double nf,double na,int xfrom1, int xto1, int ycenter, int yto1);
void Drawbackground(HDC hdc, int left, int up, int right, int down, int xfrom1, int xto1, int yfrom1, int yto1, int ycenter1);
void BandPassFiltering(int N, double beta, double sf, double sa, double nf, double na);
void BandReject(int N, double beta);
void BandRejectFiltering(int N, double beta, double sf, double sa, double nf, double na);
void drawfilteredwave(HDC hdc, double sf, double sa, double nf, double na, int xfrom1, int xto1, int ycenter, int yto1);
void drawplusewave(HDC hdc, double sf, double sa, double nf, double na,int xfrom1, int xto1, int ycenter, int yto1);
void DrawScaleFre(HDC hdc,int xfrom1, int xto1, int yfrom1, int yto1, int ycenter1);
void HighPass(int N, double beta);
void HighPassFiltering(int N, double beta,double sf, double sa, double nf, double na);
void LowPass(int N, double beta);
void LowPassFiltering(int N,double beta,double sf, double sa, double nf, double na);
struct complex
{
double x, y;
};
short int fft(long int N,complex *z);
short int realfft(long int N,complex *z);
void BandPass(int N, double beta);
double kaiser(int n,int i, double beta);
double bessel(double a);
HDC hdc; //Define the handle of device context HDC Handle to a device context (DC).
CPen pen0,penk,pen2,penu1,penu2,pend1,pend2,penred;
CRect r;
HBITMAP hbit1,hbit2;
HDC hdctmp1,hdctmp2;
HANDLE horigimage;
HANDLE hsignal;
HANDLE hpluse,hpls;
HANDLE hfilter;
HANDLE horigdata;
int datalength;
double *lporigdata;
complex *lpfftdata;
CBrush cb;
int analeng;
double *lpsignal;
double *lppluse,*lppls;
double *lpfilter;
// Dialog Data
//{{AFX_DATA(CMyDlg)
enum { IDD = IDD_MY_DIALOG };
double m_downfre;
double m_pass;
double m_reject;
double m_upfre;
BOOL m_addnoise;
int m_samplelen;
int m_filtertype;
double m_band;
double m_fc;
double m_beta;
double m_noiseamp;
double m_noisefre;
double m_fl;
double m_fh;
double m_signalamp;
double m_signalfre;
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMyDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBottonApply();
afx_msg void OnCheckAddnoise();
afx_msg void OnSelchangeComboSamplelen();
afx_msg void OnButtonPluse();
afx_msg void OnSelchangeComboFiltertype();
afx_msg void OnChangeEditSignalfre();
afx_msg void OnNoiseAmplitude();
afx_msg void OnStaticSignalwave();
afx_msg void OnStaticSignal();
afx_msg void OnChangeEditDownfre();
afx_msg void OnStaticRejection2();
afx_msg void OnStaticFiltersignal();
afx_msg void OnChangeEditNoisefre();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DLG_H__6EB7ED7D_C9C0_451E_9CBE_0005819980C4__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -