📄 smiview.cpp
字号:
// SMIView.cpp : implementation of the CSMIView class
//
#include "stdafx.h"
#include "SMI.h"
#include "SMIDoc.h"
#include "SMIView.h"
#include "ModallessDlg.h"
#include "ModalDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSMIView
IMPLEMENT_DYNCREATE(CSMIView, CView)
BEGIN_MESSAGE_MAP(CSMIView, CView)
//{{AFX_MSG_MAP(CSMIView)
ON_COMMAND(IDM_DLG_MODALESS, OnDlgModaless)
ON_COMMAND(IDM_DLG_MODAL, OnDlgModal)
//}}AFX_MSG_MAP
// Standard printing commands
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()
/////////////////////////////////////////////////////////////////////////////
// CSMIView construction/destruction
CSMIView::CSMIView()
{
// TODO: add construction code here
}
CSMIView::~CSMIView()
{
}
BOOL CSMIView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CSMIView drawing
void CSMIView::OnDraw(CDC* pDC)
{
CSMIDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CSMIView printing
BOOL CSMIView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSMIView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSMIView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSMIView diagnostics
#ifdef _DEBUG
void CSMIView::AssertValid() const
{
CView::AssertValid();
}
void CSMIView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CSMIDoc* CSMIView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSMIDoc)));
return (CSMIDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSMIView message handlers
void CSMIView::OnDlgModaless()
{
// TODO: Add your command handler code here
CModallessDlg* pDlg = new CModallessDlg;
pDlg->Create(IDD_DLG_MODALESS,this);
pDlg->ShowWindow(SW_SHOW);
}
void CSMIView::OnDlgModal()
{
// TODO: Add your command handler code here
CModalDlg dlg;
dlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -