exam9_1view.cpp
来自「This is Visual C++ basis operation. Usin」· C++ 代码 · 共 126 行
CPP
126 行
// Exam9_1View.cpp : implementation of the CExam9_1View class
//
#include "stdafx.h"
#include "Exam9_1.h"
#include "Exam9_1Set.h"
#include "Exam9_1Doc.h"
#include "Exam9_1View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CExam9_1View
IMPLEMENT_DYNCREATE(CExam9_1View, CRecordView)
BEGIN_MESSAGE_MAP(CExam9_1View, CRecordView)
//{{AFX_MSG_MAP(CExam9_1View)
// 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
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CRecordView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CRecordView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRecordView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CExam9_1View construction/destruction
CExam9_1View::CExam9_1View()
: CRecordView(CExam9_1View::IDD)
{
//{{AFX_DATA_INIT(CExam9_1View)
// NOTE: the ClassWizard will add member initialization here
m_pSet = NULL;
//}}AFX_DATA_INIT
// TODO: add construction code here
}
CExam9_1View::~CExam9_1View()
{
}
void CExam9_1View::DoDataExchange(CDataExchange* pDX)
{
CRecordView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CExam9_1View)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BOOL CExam9_1View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CRecordView::PreCreateWindow(cs);
}
void CExam9_1View::OnInitialUpdate()
{
m_pSet = &GetDocument()->m_exam9_1Set;
CRecordView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
/////////////////////////////////////////////////////////////////////////////
// CExam9_1View printing
BOOL CExam9_1View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CExam9_1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CExam9_1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CExam9_1View diagnostics
#ifdef _DEBUG
void CExam9_1View::AssertValid() const
{
CRecordView::AssertValid();
}
void CExam9_1View::Dump(CDumpContext& dc) const
{
CRecordView::Dump(dc);
}
CExam9_1Doc* CExam9_1View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExam9_1Doc)));
return (CExam9_1Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CExam9_1View database support
CRecordset* CExam9_1View::OnGetRecordset()
{
return m_pSet;
}
/////////////////////////////////////////////////////////////////////////////
// CExam9_1View message handlers
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?