📄 studentinfview.cpp
字号:
// StudentInfView.cpp : implementation of the CStudentInfView class
//
#include "stdafx.h"
#include "StudentInf.h"
#include "StudentInfDoc.h"
#include "StudentInfView.h"
#include "StudentInfWizard.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CStudentInfView
IMPLEMENT_DYNCREATE(CStudentInfView, CEditView)
BEGIN_MESSAGE_MAP(CStudentInfView, CEditView)
//{{AFX_MSG_MAP(CStudentInfView)
ON_COMMAND(ID_STUDENT_INF_WIZARD, OnStudentInfWizard)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CStudentInfView construction/destruction
CStudentInfView::CStudentInfView()
{
// TODO: add construction code here
}
CStudentInfView::~CStudentInfView()
{
}
BOOL CStudentInfView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
BOOL bPreCreated = CEditView::PreCreateWindow(cs);
cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
return bPreCreated;
}
/////////////////////////////////////////////////////////////////////////////
// CStudentInfView drawing
void CStudentInfView::OnDraw(CDC* pDC)
{
CStudentInfDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CStudentInfView printing
BOOL CStudentInfView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CStudentInfView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CStudentInfView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CStudentInfView diagnostics
#ifdef _DEBUG
void CStudentInfView::AssertValid() const
{
CEditView::AssertValid();
}
void CStudentInfView::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
CStudentInfDoc* CStudentInfView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CStudentInfDoc)));
return (CStudentInfDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CStudentInfView message handlers
void CStudentInfView::OnStudentInfWizard()
{
// TODO: Add your command handler code here
CStudentInfWizard studentInfWizard(ID_STUDENT_INF_WIZARD);
studentInfWizard.SetWizardMode();//设置属性表的运行模式为向导模式
if(studentInfWizard.DoModal() == ID_WIZFINISH)
{
CString str;
GetWindowText(str);
str+=studentInfWizard.m_RegisteredInf.m_RegisteredInf;
SetWindowText(str);
//将studentInfWizard中的信息数据保存并显示在文本视图或树型视图中。
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -