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

📄 hanzifreqview.cpp

📁 汉字字频统计软件说明: 1. 这个小工具可以对一个文本文件中出现的汉字的字形数和字种数进行频次统计; 2. 字频统计结果按照降序输出; 3. 可同时选中多个文本文件进行字频统计; 4. 程
💻 CPP
字号:
// HanZiFreqView.cpp : implementation of the CHanZiFreqView class
//

#include "stdafx.h"
#include "HanZiFreq.h"

#include "HanZiFreqDoc.h"
#include "CntrItem.h"
#include "HanZiFreqView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CHanZiFreqView

IMPLEMENT_DYNCREATE(CHanZiFreqView, CRichEditView)

BEGIN_MESSAGE_MAP(CHanZiFreqView, CRichEditView)
	//{{AFX_MSG_MAP(CHanZiFreqView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	ON_WM_DESTROY()
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CHanZiFreqView construction/destruction

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

}

CHanZiFreqView::~CHanZiFreqView()
{
}

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

	return CRichEditView::PreCreateWindow(cs);
}

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


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

/////////////////////////////////////////////////////////////////////////////
// CHanZiFreqView printing

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


void CHanZiFreqView::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);
   }
}


/////////////////////////////////////////////////////////////////////////////
// CHanZiFreqView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CHanZiFreqView message handlers

⌨️ 快捷键说明

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