📄 parasetdlg.cpp
字号:
// ParaSetDlg.cpp : implementation file
//
#include "stdafx.h"
#include "FFT.h"
#include "ParaSetDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CParaSetDlg dialog
CParaSetDlg::CParaSetDlg(CWnd* pParent /*=NULL*/)
: CDialog(CParaSetDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CParaSetDlg)
m_Name1 = _T("");
m_Name2 = _T("");
m_Name0 = _T("");
m_fPara1 = 0.0f;
m_fPara2 = 0.0f;
count = 16;
//}}AFX_DATA_INIT
}
void CParaSetDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CParaSetDlg)
DDX_Control(pDX, IDC_PARA2, m_Con2);
DDX_Control(pDX, IDC_PARA1, m_Con1);
DDX_Text(pDX, IDC_PARA_NAME1, m_Name1);
DDX_Text(pDX, IDC_PARA_NAME2, m_Name2);
DDX_Text(pDX, IDC_PARA_NAME0, m_Name0);
DDX_Text(pDX, IDC_PARA1, m_fPara1);
DDX_Text(pDX, IDC_PARA2, m_fPara2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CParaSetDlg, CDialog)
//{{AFX_MSG_MAP(CParaSetDlg)
ON_CBN_SELCHANGE(IDC_COMBO_COUNT, OnSelchangeComboCount)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CParaSetDlg message handlers
BOOL CParaSetDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
if (index == 1)
{
m_fPara1 = 8;
m_fPara2 = 8;
}
else if(index == 2)
{
m_fPara1 = 0.1;
m_fPara2 = 0.0625;
m_Con1.EnableWindow(FALSE);
}
else if (index ==3 || index == 4)
{
m_Con1.ShowWindow(SW_HIDE);
m_Con2.ShowWindow(SW_HIDE);
}
UpdateData(FALSE);
((CComboBox *)GetDlgItem (IDC_COMBO_COUNT))->SetCurSel(0);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CParaSetDlg::OnSelchangeComboCount()
{
// TODO: Add your control notification handler code here
int index0 = ((CComboBox *)GetDlgItem (IDC_COMBO_COUNT))->GetCurSel();
switch (index0)
{
case 0:
count = 16;
break;
case 1:
count = 8;
break;
case 2:
count = 32;
break;
case 3:
count = 64;
break;
case 4:
count = 128;
break;
// case 5:
// count = 256;
// break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -