📄 set2view.cpp
字号:
// Set2View.cpp : implementation file
//
#include "stdafx.h"
#include "CDMS.h"
#include "Set2View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSet2View
IMPLEMENT_DYNCREATE(CSet2View, CFormView)
CSet2View::CSet2View()
: CFormView(CSet2View::IDD)
{
//{{AFX_DATA_INIT(CSet2View)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_pMainFrame = NULL;
}
CSet2View::~CSet2View()
{
}
void CSet2View::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSet2View)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSet2View, CFormView)
//{{AFX_MSG_MAP(CSet2View)
ON_WM_DESTROY()
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSet2View diagnostics
#ifdef _DEBUG
void CSet2View::AssertValid() const
{
CFormView::AssertValid();
}
void CSet2View::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSet2View message handlers
void CSet2View::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
/*----隐藏滚动条----*/
CSize sizeTotal;
sizeTotal.cx = sizeTotal.cy = 0;
SetScrollSizes(MM_TEXT, sizeTotal);
/*----隐藏滚动条----*/
//<-------------获取主框架指针------------->
m_pMainFrame = (CMainFrame*)AfxGetMainWnd();
//<-------------保存窗口指针------------->
m_pMainFrame->m_hViewSet2 = this->m_hWnd;
// InitCobArray();
}
void CSet2View::OnDestroy()
{
m_pMainFrame->m_hViewSet2 = NULL;
CFormView::OnDestroy();
// TODO: Add your message handler code here
}
LRESULT CSet2View::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
// TODO: Add your specialized code here and/or call the base class
switch(message)
{
case UM_ACTIVATE_VIEW2:
this->GetParentFrame()->ActivateFrame();
break;
case UM_COLLECTCOMPLETE:
for(int i=0; i<1024; i++)
{
m_nData[i] = m_pMainFrame->m_nOriginalData[1][i];
}
// DrawBackgroundOfTimeDomainWave();
break;
}
return CFormView::WindowProc(message, wParam, lParam);
}
void CSet2View::OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView)
{
// TODO: Add your specialized code here and/or call the base class
if(bActivate)
{
//设置当前活动视图标志
m_pMainFrame->SetCurActiveView(VIEW_TYPE_SET2);//
}
CFormView::OnActivateView(bActivate, pActivateView, pDeactiveView);
}
void CSet2View::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CFormView::OnPaint() for painting messages
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -