📄 thirdworkview.cpp
字号:
// THIRDWORKView.cpp : implementation of the CTHIRDWORKView class
//
#include "stdafx.h"
#include "THIRDWORK.h"
#include "THIRDWORKDoc.h"
#include "THIRDWORKView.h"
#include "PICTURE.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTHIRDWORKView
IMPLEMENT_DYNCREATE(CTHIRDWORKView, CView)
BEGIN_MESSAGE_MAP(CTHIRDWORKView, CView)
//{{AFX_MSG_MAP(CTHIRDWORKView)
ON_COMMAND(ID_BEGIN, OnBegin)
ON_WM_PAINT()
ON_WM_CHAR()
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CTHIRDWORKView construction/destruction
CTHIRDWORKView::CTHIRDWORKView()
{
// TODO: add construction code here
}
CTHIRDWORKView::~CTHIRDWORKView()
{
}
BOOL CTHIRDWORKView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CTHIRDWORKView drawing
void CTHIRDWORKView::OnDraw(CDC* pDC)
{
CTHIRDWORKDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CTHIRDWORKView printing
BOOL CTHIRDWORKView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CTHIRDWORKView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CTHIRDWORKView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CTHIRDWORKView diagnostics
#ifdef _DEBUG
void CTHIRDWORKView::AssertValid() const
{
CView::AssertValid();
}
void CTHIRDWORKView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CTHIRDWORKDoc* CTHIRDWORKView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTHIRDWORKDoc)));
return (CTHIRDWORKDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTHIRDWORKView message handlers
void CTHIRDWORKView::OnBegin()
{
// TODO: Add your command handler code here
PICTURE dlg;
dlg.DoModal();
}
void CTHIRDWORKView::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
dc.TextOut(350,0,"欢迎使用我的画图工具");
// Do not call CView::OnPaint() for painting messages
}
void CTHIRDWORKView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
CView::OnChar(nChar, nRepCnt, nFlags);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -