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

📄 图像增强技术view.cpp

📁 哥们图像增强技术的毕业设计
💻 CPP
字号:
// 图像增强技术View.cpp : implementation of the CMyView 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

/////////////////////////////////////////////////////////////////////////////
// CMyView

IMPLEMENT_DYNCREATE(CMyView, CView)

BEGIN_MESSAGE_MAP(CMyView, CView)
	//{{AFX_MSG_MAP(CMyView)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyView construction/destruction

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

}

CMyView::~CMyView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CMyView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CMyView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CMyView diagnostics

#ifdef _DEBUG
void CMyView::AssertValid() const
{
	CView::AssertValid();
}

void CMyView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CMyView message handlers

//DEL void CMyView::OnLplssharp() 
//DEL {
//DEL 	// TODO: Add your command handler code here
//DEL 
//DEL 	CMyDoc* pDoc=GetDocument();
//DEL 	//指向DIB的指针
//DEL 	LPSTR lpDIB;
//DEL 	//指向DIB像素的指针
//DEL 	LPSTR lpDIBBits;
//DEL     //锁定DIB
//DEL 	lpDIB=(LPSTR)::GlobalLock((HGLOBAL)pDoc->GetHDIB());
//DEL 	lpDIBBits=lpDIB+*(LPDWORD)lpDIB+(WORD)(8*sizeof(RGBQUAD));
//DEL     
//DEL 	//定义模板的高度,宽度,系数及模板中心元素的X坐标,Y坐标
//DEL 	int iTempH,iTempW,iTempMX,iTempMY;
//DEL     float fTempC;
//DEL 
//DEL 	//模板元素数组
//DEL 	FLOAT aValue[9];
//DEL 
//DEL 	//设置拉普拉斯模板参数
//DEL 	iTempH=3;
//DEL 	iTempW=3;
//DEL 	fTempC=1.0;
//DEL 	iTempMX=1;
//DEL 	iTempMY=1;
//DEL 	aValue[0]=-1.0;
//DEL 	aValue[1]=-1.0;
//DEL 	aValue[2]=-1.0;
//DEL 	aValue[3]=-1.0;
//DEL 	aValue[4]= 9.0;
//DEL 	aValue[5]=-1.0;
//DEL 	aValue[6]=-1.0;
//DEL 	aValue[7]=-1.0;
//DEL 	aValue[8]=-1.0;
//DEL 
//DEL     
//DEL 	//调用Template()函数用拉普拉斯模板锐化DIB
//DEL 	CMyDoc::Template(lpDIBBits,CMyDoc::m_size.cy,CMyDoc::m_size.cx,iTempH,iTempW,iTempMX,iTempMY,aValue,fTempC);
//DEL 	
//DEL 	pDoc->UpdateAllViews(NULL);
//DEL 	pDoc->SetModifiedFlag();
//DEL 
//DEL }


⌨️ 快捷键说明

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