📄 e0503view.cpp
字号:
// E0503View.cpp : implementation of the CE0503View class
//
#include "stdafx.h"
#include "E0503.h"
#include "E0503Doc.h"
#include "E0503View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CE0503View
IMPLEMENT_DYNCREATE(CE0503View, CView)
BEGIN_MESSAGE_MAP(CE0503View, CView)
//{{AFX_MSG_MAP(CE0503View)
// 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, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CE0503View construction/destruction
CE0503View::CE0503View()
{
m_bmIcon1.LoadBitmap(IDB_BITMAP3);
m_bmIcon2.LoadBitmap(IDB_BITMAP4);
}
CE0503View::~CE0503View()
{
}
BOOL CE0503View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CE0503View drawing
void CE0503View::OnDraw(CDC* pDC)
{
CE0503Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CWnd * pWnd = AfxGetMainWnd();
CMenu * pMenu = pWnd->GetMenu();
CMenu * pMyMenu = pMenu->GetSubMenu(3);
pMyMenu->SetMenuItemBitmaps(0, MF_BYPOSITION, &m_bmIcon1, &m_bmIcon1);
pMyMenu->SetMenuItemBitmaps(1, MF_BYPOSITION, &m_bmIcon2, &m_bmIcon2);
}
/////////////////////////////////////////////////////////////////////////////
// CE0503View printing
BOOL CE0503View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CE0503View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CE0503View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CE0503View diagnostics
#ifdef _DEBUG
void CE0503View::AssertValid() const
{
CView::AssertValid();
}
void CE0503View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CE0503Doc* CE0503View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CE0503Doc)));
return (CE0503Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CE0503View message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -