📄 paramsview.cpp
字号:
// paramsView.cpp : implementation of the CParamsView class
//
#include "stdafx.h"
#include "params.h"
#include "paramsDoc.h"
#include "paramsView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CParamsView
IMPLEMENT_DYNCREATE(CParamsView, CFormView)
BEGIN_MESSAGE_MAP(CParamsView, CFormView)
//{{AFX_MSG_MAP(CParamsView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CParamsView construction/destruction
CParamsView::CParamsView()
: CFormView(CParamsView::IDD)
{
//{{AFX_DATA_INIT(CParamsView)
m_P1 = FALSE;
m_P2 = FALSE;
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CParamsView::~CParamsView()
{
}
void CParamsView::DoDataExchange(CDataExchange* pDX)
{
CFormView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CParamsView)
DDX_Check(pDX, IDC_P1, m_P1);
DDX_Check(pDX, IDC_P2, m_P2);
//}}AFX_DATA_MAP
}
BOOL CParamsView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CFormView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CParamsView diagnostics
#ifdef _DEBUG
void CParamsView::AssertValid() const
{
CFormView::AssertValid();
}
void CParamsView::Dump(CDumpContext& dc) const
{
CFormView::Dump(dc);
}
CParamsDoc* CParamsView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CParamsDoc)));
return (CParamsDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CParamsView message handlers
void CParamsView::OnInitialUpdate()
{
CParamsApp *app=(CParamsApp *)AfxGetApp();
// read values from app before showing form
m_P1=app->m_P1;
m_P2=app->m_P2;
CFormView::OnInitialUpdate();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -