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