📄 fesview.cpp
字号:
// FESView.cpp : implementation of the CFESView class
//
#include "stdafx.h"
#include "FES.h"
#include "FESDoc.h"
#include "FESView.h"
#include "SetDlg.h"
#include "InsDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFESView
IMPLEMENT_DYNCREATE(CFESView, CView)
BEGIN_MESSAGE_MAP(CFESView, CView)
//{{AFX_MSG_MAP(CFESView)
ON_COMMAND(ID_TOOL_SET, OnToolSet)
ON_COMMAND(ID_HELP_INSTRUCTION, OnHelpInstruction)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CFESView construction/destruction
CFESView::CFESView()
{
// TODO: add construction code here
}
CFESView::~CFESView()
{
}
BOOL CFESView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CFESView drawing
void CFESView::OnDraw(CDC* pDC)
{
CFESDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
extern CString fileInfo[3];
CString fInfo;
if(fileInfo[0]!="无标题"){
fInfo="文件名:";
fInfo+=fileInfo[0];
fInfo+="\n";
fInfo+="\n";
fInfo+="\n";
fInfo+="文件大小:";
fInfo+=fileInfo[1];
fInfo+="\n";
fInfo+="\n";
fInfo+="\n";
fInfo+="文件位置:";
fInfo+=fileInfo[2];
fInfo+="\n";
pDC->DrawText(fInfo,CRect(0,0,600,600),DT_LEFT);
}
}
/////////////////////////////////////////////////////////////////////////////
// CFESView printing
BOOL CFESView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CFESView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CFESView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CFESView diagnostics
#ifdef _DEBUG
void CFESView::AssertValid() const
{
CView::AssertValid();
}
void CFESView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CFESDoc* CFESView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CFESDoc)));
return (CFESDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CFESView message handlers
void CFESView::OnToolSet()
{
// TODO: Add your command handler code here
CSetDlg dlg;
dlg.DoModal();
}
void CFESView::OnHelpInstruction()
{
// TODO: Add your command handler code here
CInsDlg insDlg;
insDlg.DoModal();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -