📄 1view.cpp
字号:
// 1View.cpp : implementation of the CMy1View class
//
#include "stdafx.h"
#include "1.h"
#include "1Doc.h"
#include "1View.h"
#include "Antcolony.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMy1View
IMPLEMENT_DYNCREATE(CMy1View, CView)
BEGIN_MESSAGE_MAP(CMy1View, CView)
//{{AFX_MSG_MAP(CMy1View)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CMy1View construction/destruction
CMy1View::CMy1View()
{
// TODO: add construction code here
}
CMy1View::~CMy1View()
{
}
BOOL CMy1View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CMy1View drawing
void CMy1View::OnDraw(CDC* pDC)
{
CMy1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CMy1View printing
BOOL CMy1View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CMy1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CMy1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CMy1View diagnostics
#ifdef _DEBUG
void CMy1View::AssertValid() const
{
CView::AssertValid();
}
void CMy1View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CMy1Doc* CMy1View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMy1Doc)));
return (CMy1Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMy1View message handlers
/*void CMy1View::OnOutput()
{
CMy1View* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CClientDC pDC(this);
for(int e=0;e<pDoc->s2;e++)
for(int f=0;f<3;f++)
{
sprintf(str,"%d",pDoc->E[e][f]);
pDC.TextOut((e*30+120),20*f,str);
}
}*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -