?? lmsview.cpp
字號:
// lmsView.cpp : implementation of the CLmsView class
//
#include "stdafx.h"
#include "lms.h"
#include "show.h"
#include "lmsView.h"
#include "math.h"
#include "MainFrm.h"
#include "lmsDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLmsView
IMPLEMENT_DYNCREATE(CLmsView, CFormView)
BEGIN_MESSAGE_MAP(CLmsView, CFormView)
//{{AFX_MSG_MAP(CLmsView)
ON_BN_CLICKED(IDC_nolms, Onnolms)
ON_BN_CLICKED(IDC_firlms, Onfirlms)
ON_BN_CLICKED(IDC_iirlms, Oniirlms)
ON_BN_CLICKED(IDC_showoutput, Onshowoutput)
ON_EN_CHANGE(IDC_UUvalue, OnChangeUUvalue)
ON_BN_CLICKED(IDC_sininput, Onsininput)
ON_BN_CLICKED(IDC_squareinput, Onsquareinput)
ON_BN_CLICKED(IDC_triangleinput, Ontriangleinput)
ON_EN_CHANGE(IDC_aaValue, OnChangeaaValue)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CFormView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CFormView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CLmsView construction/destruction
CLmsView::CLmsView()
: CFormView(CLmsView::IDD)
{
//{{AFX_DATA_INIT(CLmsView)
m_nolms = FALSE;
m_iirlms = FALSE;
m_firlms = FALSE;
m_Uvalue = 0.02f;
m_aaValue = 0.008f;
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CLmsView::~CLmsView()
{
}
void CLmsView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CLmsView)
DDX_Check(pDX, IDC_nolms, m_nolms);
DDX_Check(pDX, IDC_iirlms, m_iirlms);
DDX_Check(pDX, IDC_firlms, m_firlms);
DDX_Text(pDX, IDC_UUvalue, m_Uvalue);
DDV_MinMaxFloat(pDX, m_Uvalue, 0.f, 1.f);
DDX_Text(pDX, IDC_aaValue, m_aaValue);
DDV_MinMaxFloat(pDX, m_aaValue, 0.f, 1.f);
//}}AFX_DATA_MAP
}
BOOL CLmsView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
void CLmsView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CLmsView printing
BOOL CLmsView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CLmsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CLmsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
void CLmsView::OnPrint(CDC* pDC, CPrintInfo* /*pInfo*/)
{
// TODO: add customized printing code here
}
/////////////////////////////////////////////////////////////////////////////
// CLmsView diagnostics
#ifdef _DEBUG
void CLmsView::AssertValid() const
{
CFormView::AssertValid();
}
void CLmsView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CLmsDoc* CLmsView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CLmsDoc)));
return (CLmsDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CLmsView message handlers
void CLmsView::Onnolms()
{
m_nolms=!m_nolms;
}
void CLmsView::Onfirlms()
{
m_firlms=!m_firlms;
}
void CLmsView::Oniirlms()
{
m_iirlms=!m_iirlms;
}
//顯示輸出按鈕響應函數
void CLmsView::Onshowoutput()
{
CLmsApp *pApp = (CLmsApp *)AfxGetApp();
CMainFrame *pFrame = (CMainFrame *)pApp->m_pMainWnd;
show *pView = (show *)pFrame->diviedview.GetPane(0,1);
pView->index=1;
pView->Invalidate();
}
void CLmsView::Onuvalue()
{
UpdateData(TRUE);
}
void CLmsView::OnChangeUUvalue()
{
UpdateData(TRUE);
}
void CLmsView::Onsininput()
{
m_sininput=true;
m_triangleinput=false;
m_squareinput=false;
}
void CLmsView::Onsquareinput()
{
m_squareinput=true;
m_sininput=false;
m_triangleinput=false;
}
void CLmsView::Ontriangleinput()
{
m_triangleinput=true;
m_squareinput=false;
m_sininput=false;
}
void CLmsView::OnChangeaaValue()
{
UpdateData(TRUE);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -