📄 e0607view.cpp
字号:
// E0607View.cpp : implementation of the CE0607View class
//
#include "stdafx.h"
#include "E0607.h"
#include "E0607Doc.h"
#include "E0607View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CE0607View
IMPLEMENT_DYNCREATE(CE0607View, CView)
BEGIN_MESSAGE_MAP(CE0607View, CView)
//{{AFX_MSG_MAP(CE0607View)
// 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_MESSAGE(WM_EAXMINEE_INFO, OnExamineeInfo)
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CE0607View construction/destruction
CE0607View::CE0607View()
{
m_ExamID = _T("");
m_ExamName = _T("");
}
CE0607View::~CE0607View()
{
}
BOOL CE0607View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CE0607View drawing
void CE0607View::OnDraw(CDC* pDC)
{
CE0607Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
pDC->TextOut(0, 0, "考生姓名:"+m_ExamName);
pDC->TextOut(0, 30, "考生编号:"+m_ExamID);
}
/////////////////////////////////////////////////////////////////////////////
// CE0607View printing
BOOL CE0607View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CE0607View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CE0607View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CE0607View diagnostics
#ifdef _DEBUG
void CE0607View::AssertValid() const
{
CView::AssertValid();
}
void CE0607View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CE0607Doc* CE0607View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CE0607Doc)));
return (CE0607Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CE0607View message handlers
LONG CE0607View::OnExamineeInfo(WPARAM wParam, LPARAM lParam)
{
char * name = new char[50];
name = (char *)wParam;
m_ExamID.Format(_T("%d"), (UINT)lParam);
m_ExamName.Format(_T("%s"), name);
UpdateData(FALSE);
Invalidate();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -