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

📄 nodepage.cpp

📁 对文本文件进行huffman编码
💻 CPP
字号:
// NodePage.cpp : 实现文件
//

#include "stdafx.h"
#include "huffman.h"
#include "NodeFont.h"
#include "NodePage.h"
#include ".\nodepage.h"


// CNodePage 对话框

IMPLEMENT_DYNAMIC(CNodePage, CPropertyPage)
CNodePage::CNodePage()
	: CPropertyPage(CNodePage::IDD)
	, m_notLeaf(_T("*"))
	, m_spaceLeaf(_T("*"))
{
}

CNodePage::~CNodePage()
{
}

void CNodePage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	DDX_CBString(pDX, IDC_NOTLEAFBOX, m_notLeaf);
	DDX_CBString(pDX, IDC_SPACELEAFBOX, m_spaceLeaf);
}


BEGIN_MESSAGE_MAP(CNodePage, CPropertyPage)
	ON_BN_CLICKED(IDC_LEAFFONT, OnBnClickedLeaffont)
	ON_BN_CLICKED(IDC_NOTLEAFFONT, OnBnClickedNotleaffont)
	ON_BN_CLICKED(IDC_SPACELEAFFONT, OnBnClickedSpaceleaffont)
END_MESSAGE_MAP()


// CNodePage 消息处理程序

void CNodePage::OnBnClickedLeaffont()
{
	//CDC * pDC=GetDC();
	//CFont * font=pDC->GetCurrentFont();
	//LOGFONT lf;
	//font->GetLogFont(&lf);
	//ReleaseDC(pDC);
	CNodeFont nf(&m_leafFont);
	if(nf.DoModal()==IDOK)
	{
		nf.GetCurrentFont(&m_leafFont);
		m_clrLeaf=nf.GetColor();
	}
}

void CNodePage::OnBnClickedNotleaffont()
{
	//CDC * pDC=GetDC();
	//CFont * font=pDC->GetCurrentFont();
	//LOGFONT lf;
	//font->GetLogFont(&lf);
	//CString str;
	//str.Format("%d",lf.lfClipPrecision);
	//::AfxMessageBox(str);
	//ReleaseDC(pDC);
	CNodeFont nf(&m_notLeafFont);
	if(nf.DoModal()==IDOK)
	{
		nf.GetCurrentFont(&m_notLeafFont);
		m_clrNotLeaf=nf.GetColor();
	}
}

void CNodePage::OnBnClickedSpaceleaffont()
{
	//CDC * pDC=GetDC();
	//CFont * font=pDC->GetCurrentFont();
	//LOGFONT lf;
	//font->GetLogFont(&lf);
	//ReleaseDC(pDC);
	CNodeFont nf(&m_spaceLeafFont);
	if(nf.DoModal()==IDOK)
	{
		nf.GetCurrentFont(&m_spaceLeafFont);
		m_clrSpaceLeaf=nf.GetColor();
	}
}

⌨️ 快捷键说明

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