?? postagview.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 + -