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

📄 数字水印技术view.cpp

📁 基于变换域的信息隐藏技术
💻 CPP
字号:
// 整数DCT图像压缩View.cpp : implementation of the CDCTView class
//

#include "stdafx.h"
#include "数字水印技术.h"

#include "数字水印技术Doc.h"
#include "数字水印技术View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDCTView

IMPLEMENT_DYNCREATE(CDCTView, CScrollView)

BEGIN_MESSAGE_MAP(CDCTView, CScrollView)
	//{{AFX_MSG_MAP(CDCTView)
	ON_COMMAND(ID_SHOW, OnShow)
	ON_WM_TIMER()
	ON_COMMAND(ID_TEXT, OnText)
	ON_COMMAND(ID_STOP, OnStop)
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CDCTView construction/destruction

CDCTView::CDCTView()
{
	// TODO: add construction code here
	x=0;

}

CDCTView::~CDCTView()
{
}

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

	return CScrollView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CDCTView drawing

void CDCTView::OnDraw(CDC* pDC)
{
	CDCTDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
	pDoc->OnDraw(pDC);
//	pDoc->OnDraw22(pDC);

	TRACE("This is a little app!");
	COLORREF color=RGB(200,50,100);
	pDC->SetTextColor(color);
	pDC->TextOut(x,300,"基于变换阈的数字水印技术(嵌入技术的研究!徐峰,尹术懿、樊海荣、武萌)");

	x+=100;
	RECT re;
	GetClientRect(&re);
	if(x>re.right-re.left)
		x=0;


}

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

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

/////////////////////////////////////////////////////////////////////////////
// CDCTView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CDCTView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CDCTView message handlers

void CDCTView::OnShow() 
{
	// TODO: Add your command handler code here
	SetTimer(1,20000,NULL);
}

void CDCTView::OnTimer(UINT nIDEvent) 
{
	// TODO: Add your message handler code here and/or call default
	Invalidate();
	CScrollView::OnTimer(nIDEvent);
}

void CDCTView::OnText() 
{
	// TODO: Add your command handler code here
	SetTimer(1,200,NULL);
}

void CDCTView::OnStop() 
{
	// TODO: Add your command handler code here
	KillTimer(1);
}

⌨️ 快捷键说明

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