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

📄 hicview.cpp

📁 视频图像的压缩编码。用Vc编写的
💻 CPP
字号:
// HICView.cpp : implementation of the CHICView class
//

#include "stdafx.h"
#include "HIC.h"

#include "HICDoc.h"
#include "HICView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CHICView

IMPLEMENT_DYNCREATE(CHICView, CScrollView)

BEGIN_MESSAGE_MAP(CHICView, CScrollView)
	//{{AFX_MSG_MAP(CHICView)
		// 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, CScrollView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CScrollView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CScrollView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CHICView construction/destruction

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

}

CHICView::~CHICView()
{
}

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

	return CScrollView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CHICView drawing

void CHICView::OnDraw(CDC* pDC)
{
	CHICDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	CRect rect1(20,30,20+pDoc->lpSrc.Width(),30+pDoc->lpSrc.Height());
    CRect rect2(40+pDoc->lpDst1.Width(),30,40+pDoc->lpDst1.Width()*2,30+pDoc->lpDst1.Height());
    CRect rect3(60+pDoc->lpDst1.Width()*2,30,60+pDoc->lpDst2.Width()*3,30+pDoc->lpDst2.Height());
	if(	pDoc->lpSrc.IsValid())
	{
		pDoc->lpSrc.Paint(pDC->GetSafeHdc(),rect1);
	    pDC->DrawText("原始图像",CRect(20,pDoc->lpSrc.Height()+30,
			20+pDoc->lpSrc.Width(),pDoc->lpSrc.Height()+50),DT_CENTER);
	}
	if(	pDoc->lpDst1.IsValid())
	{
		pDoc->lpDst1.Paint(pDC->GetSafeHdc(),rect2);
	    pDC->DrawText("Spiht解码后图像",CRect(pDoc->lpDst1.Width()+40,pDoc->lpDst1.Height()+30,
			40+pDoc->lpDst1.Width()*2,pDoc->lpDst1.Height()+50),DT_CENTER);
	}

	if(	pDoc->lpDst2.IsValid())
	{
		pDoc->lpDst2.Paint(pDC->GetSafeHdc(),rect3);
	    pDC->DrawText("小波反变换后图像",CRect(pDoc->lpDst2.Width()*2+60,pDoc->lpDst2.Height()+30,
			60+pDoc->lpDst2.Width()*3,pDoc->lpDst2.Height()+50),DT_CENTER);
	}
}

void CHICView::OnInitialUpdate()
{
	CScrollView::OnInitialUpdate();

	CSize sizeTotal;
	// TODO: calculate the total size of this view
	sizeTotal.cx = sizeTotal.cy = 2000;
	SetScrollSizes(MM_TEXT, sizeTotal);
}

/////////////////////////////////////////////////////////////////////////////
// CHICView printing

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

void CHICView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CHICView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CHICView diagnostics

#ifdef _DEBUG
void CHICView::AssertValid() const
{
	CScrollView::AssertValid();
}

void CHICView::Dump(CDumpContext& dc) const
{
	CScrollView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CHICView message handlers

⌨️ 快捷键说明

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