hz_freqview.cpp

来自「文本中汉字频率统计的程序」· C++ 代码 · 共 110 行

CPP
110
字号
// HZ_FreqView.cpp : implementation of the CHZ_FreqView class
//

#include "stdafx.h"
#include "HZ_Freq.h"

#include "HZ_FreqDoc.h"
#include "HZ_FreqView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CHZ_FreqView

IMPLEMENT_DYNCREATE(CHZ_FreqView, CEditView)

BEGIN_MESSAGE_MAP(CHZ_FreqView, CEditView)
	//{{AFX_MSG_MAP(CHZ_FreqView)
		// 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
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CHZ_FreqView construction/destruction

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

}

CHZ_FreqView::~CHZ_FreqView()
{
}

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

	BOOL bPreCreated = CEditView::PreCreateWindow(cs);
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping

	return bPreCreated;
}

/////////////////////////////////////////////////////////////////////////////
// CHZ_FreqView drawing

void CHZ_FreqView::OnDraw(CDC* pDC)
{
	CHZ_FreqDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CHZ_FreqView printing

BOOL CHZ_FreqView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default CEditView preparation
	return CEditView::OnPreparePrinting(pInfo);
}

void CHZ_FreqView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView begin printing.
	CEditView::OnBeginPrinting(pDC, pInfo);
}

void CHZ_FreqView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView end printing
	CEditView::OnEndPrinting(pDC, pInfo);
}

/////////////////////////////////////////////////////////////////////////////
// CHZ_FreqView diagnostics

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

void CHZ_FreqView::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CHZ_FreqView message handlers

⌨️ 快捷键说明

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