📄 lxsview.cpp
字号:
// LXSView.cpp : implementation of the CLXSView class
//
#include "stdafx.h"
#include "LXS.h"
#include "LXSDoc.h"
#include "LXSView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLXSView
IMPLEMENT_DYNCREATE(CLXSView, CView)
BEGIN_MESSAGE_MAP(CLXSView, CView)
//{{AFX_MSG_MAP(CLXSView)
ON_COMMAND(ID_KH, OnKh)
ON_COMMAND(ID_TD, OnTd)
ON_COMMAND(ID_XL, OnXl)
ON_COMMAND(ID_JD, OnJd)
ON_COMMAND(ID_BM, OnBm)
ON_COMMAND(ID_KHLY, OnKhly)
ON_COMMAND(ID_DL, OnDl)
ON_COMMAND(ID_XLQY, OnXlqy)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CLXSView construction/destruction
CLXSView::CLXSView()
{
// TODO: add construction code here
}
CLXSView::~CLXSView()
{
}
BOOL CLXSView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CLXSView drawing
void CLXSView::OnDraw(CDC* pDC)
{
CLXSDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CDC MemDC;
MemDC.CreateCompatibleDC(NULL);
MemDC.SelectObject(pDoc->m_bitmap);
pDC->BitBlt(0,0,pDoc->m_nwidth,pDoc->m_nheight,&MemDC,0,0,SRCCOPY);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CLXSView printing
BOOL CLXSView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CLXSView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CLXSView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CLXSView diagnostics
#ifdef _DEBUG
void CLXSView::AssertValid() const
{
CView::AssertValid();
}
void CLXSView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CLXSDoc* CLXSView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CLXSDoc)));
return (CLXSDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CLXSView message handlers
void CLXSView::OnKh()
{
// TODO: Add your command handler code here
CKHXXDlg dlg;
dlg.DoModal();
}
void CLXSView::OnTd()
{
// TODO: Add your command handler code here
CTDXXDlg dlg;
dlg.DoModal();
}
void CLXSView::OnXl()
{
// TODO: Add your command handler code here
CXLXXDlg dlg;
dlg.DoModal();
}
void CLXSView::OnJd()
{
// TODO: Add your command handler code here
CJDZLDlg dlg;
dlg.DoModal();
}
void CLXSView::OnBm()
{
// TODO: Add your command handler code here
CBMDlg dlg;
dlg.DoModal();
}
void CLXSView::OnKhly()
{
// TODO: Add your command handler code here
CKHLYTJDlg dlg;
dlg.DoModal();
}
void CLXSView::OnDl()
{
// TODO: Add your command handler code here
CDLDlg dlg;
dlg.DoModal();
}
void CLXSView::OnXlqy()
{
// TODO: Add your command handler code here
CXLTJDlg dlg;
dlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -