⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sorview.cpp

📁 编译原理实践教程PL0语言编译程序源代码。参考书:清华大学出版社的《编译原理》作者吕映芝、张素琴等。 实现主要功能有:对使用PL0语言编写的程序进行词法分析
💻 CPP
字号:
// SorView.cpp : implementation file
//

#include "stdafx.h"
#include "PL0.h"
#include "SorView.h"
#include "PL0Doc.h"
#include "MainFrm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSorView

IMPLEMENT_DYNCREATE(CSorView, CEditView)

CSorView::CSorView()
{
}

CSorView::~CSorView()
{
}


BEGIN_MESSAGE_MAP(CSorView, CEditView)
	//{{AFX_MSG_MAP(CSorView)
	ON_WM_MOUSEMOVE()
	ON_WM_LBUTTONDOWN()
	ON_WM_SETFOCUS()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSorView drawing

void CSorView::OnDraw(CDC* pDC)
{
	CDocument* pDoc = GetDocument();
}

/////////////////////////////////////////////////////////////////////////////
// CSorView diagnostics

#ifdef _DEBUG
void CSorView::AssertValid() const
{
	CEditView::AssertValid();
}

void CSorView::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CSorView message handlers

void CSorView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) 
{
	// TODO: Add your specialized code here and/or call the base class
	pDC->SetMapMode(MM_ISOTROPIC);
	pDC->SetWindowExt(1440,1440);
	pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX),-pDC->GetDeviceCaps(LOGPIXELSX));
	
	CEditView::OnPrepareDC(pDC, pInfo);
}

void CSorView::OnMouseMove(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default
	CString py;
	CString px;
	CString str;	
	CMainFrame* mf=(CMainFrame*)AfxGetMainWnd();
	py.Format("行: %d",GetScrollPos(1)+1+(point.y)/16);
	mf->m_wndStatusBar.SetPaneText(1,py,true);
	px.Format("列: %d",GetScrollPos(1)+1+(point.x)/8);
	mf->m_wndStatusBar.SetPaneText(2,px,true);
	//str.Empty();
//	str+=py+px;
//	mf->m_wndStatusBar.SetPaneText(1,py,true);
	
	

	CEditView::OnMouseMove(nFlags, point);
}



⌨️ 快捷键说明

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