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

📄 postagview.cpp

📁 计算机英汉机器翻译系统中的英语词性标注方法实现
💻 CPP
字号:
// PosTagView.cpp : implementation of the CPosTagView class
//

#include "stdafx.h"
#include "PosTag.h"
#include "Setnumdialog.h"
#include "PosTagDoc.h"
#include "CntrItem.h"
#include "PosTagView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPosTagView

IMPLEMENT_DYNCREATE(CPosTagView, CRichEditView)

BEGIN_MESSAGE_MAP(CPosTagView, CRichEditView)
	//{{AFX_MSG_MAP(CPosTagView)
	ON_WM_DESTROY()
	ON_COMMAND(ID_SETSENTENCENUM, OnSetsentencenum)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CRichEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CRichEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CRichEditView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPosTagView construction/destruction

extern int sentenceNum;
CPosTagView::CPosTagView()
{
	// TODO: add construction code here

}

CPosTagView::~CPosTagView()
{
}

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

	return CRichEditView::PreCreateWindow(cs);
}

void CPosTagView::OnInitialUpdate()
{
	CRichEditView::OnInitialUpdate();

	// Set the printing margins (720 twips = 1/2 inch).
	SetMargins(CRect(720, 720, 720, 720));
}

/////////////////////////////////////////////////////////////////////////////
// CPosTagView printing

BOOL CPosTagView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}


void CPosTagView::OnDestroy()
{
	// Deactivate the item on destruction; this is important
	// when a splitter view is being used.
   CRichEditView::OnDestroy();
   COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
   if (pActiveItem != NULL && pActiveItem->GetActiveView() == this)
   {
      pActiveItem->Deactivate();
      ASSERT(GetDocument()->GetInPlaceActiveItem(this) == NULL);
   }
}


/////////////////////////////////////////////////////////////////////////////
// CPosTagView diagnostics

#ifdef _DEBUG
void CPosTagView::AssertValid() const
{
	CRichEditView::AssertValid();
}

void CPosTagView::Dump(CDumpContext& dc) const
{
	CRichEditView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CPosTagView message handlers

void CPosTagView::OnSetsentencenum() 
{
	// TODO: Add your command handler code here
	Setnumdialog dlg;
	dlg.m_sentenceNum=sentenceNum;
	if(dlg.DoModal()==IDOK)
	{
		sentenceNum=dlg.m_sentenceNum;
	}
}

⌨️ 快捷键说明

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