automakeview.cpp

来自「编译原理课程设计之正则表达式与自动机之间的变换」· C++ 代码 · 共 93 行

CPP
93
字号
// AutoMakeView.cpp : implementation of the CAutoMakeView class
//

#include "stdafx.h"
#include "AutoMake.h"

#include "AutoMakeDoc.h"
#include "AutoMakeView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAutoMakeView

IMPLEMENT_DYNCREATE(CAutoMakeView, CView)

BEGIN_MESSAGE_MAP(CAutoMakeView, CView)
	//{{AFX_MSG_MAP(CAutoMakeView)
		// 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
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAutoMakeView construction/destruction

CAutoMakeView::CAutoMakeView()
{
	// TODO: add construction code here

}

CAutoMakeView::~CAutoMakeView()
{
}

BOOL CAutoMakeView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CAutoMakeView drawing

void CAutoMakeView::OnDraw(CDC* pDC)
{
	CAutoMakeDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	CRect rc;
	GetClientRect(&rc);
    CFont font;
	font.CreatePointFont(rc.Width()/6,"宋体");
	CFont *pOldFont;
	pOldFont=pDC->SelectObject(&font);
	pDC->FillRect(&rc,&CBrush(RGB(0,0,0)));
	pDC->SetTextColor(RGB(255,255,255));
	pDC->SetBkMode(TRANSPARENT);
	pDC->DrawText("实验二:正则表达式->NFA->DFA->MinDFA",&rc,DT_CENTER|DT_SINGLELINE|DT_VCENTER);
	pDC->SelectObject(pOldFont);
}

/////////////////////////////////////////////////////////////////////////////
// CAutoMakeView diagnostics

#ifdef _DEBUG
void CAutoMakeView::AssertValid() const
{
	CView::AssertValid();
}

void CAutoMakeView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CAutoMakeDoc* CAutoMakeView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAutoMakeDoc)));
	return (CAutoMakeDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CAutoMakeView message handlers

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?