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

📄 grayenhance.txt

📁 有关图像处理的程序
💻 TXT
字号:
// GrayEnhance.cpp : implementation file
//

#include "stdafx.h"
#include "dimageprocess.h"
#include "GrayEnhance.h"

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

/////////////////////////////////////////////////////////////////////////////
// CGrayEnhance dialog


CGrayEnhance::CGrayEnhance(CWnd* pParent /*=NULL*/)
	: CDialog(CGrayEnhance::IDD, pParent)
{
	//{{AFX_DATA_INIT(CGrayEnhance)
	m_oralow = 0;
	m_orahig = 255;
	m_newlow = 0;
	m_newhig = 255;
	//}}AFX_DATA_INIT
}


void CGrayEnhance::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CGrayEnhance)
	DDX_Text(pDX, IDC_EDIT1, m_oralow);
	DDX_Text(pDX, IDC_EDIT2, m_orahig);
	DDX_Text(pDX, IDC_EDIT3, m_newlow);
	DDX_Text(pDX, IDC_EDIT4, m_newhig);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CGrayEnhance, CDialog)
	//{{AFX_MSG_MAP(CGrayEnhance)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGrayEnhance message handlers

void CGrayEnhance::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	
	// 判断设置是否有效
	if ((m_oralow < 0) || (m_orahig > 255) ||(m_oralow > m_orahig)||
		(m_newlow < 0) || (m_newhig > 255)||(m_newlow > m_newhig))
	{
		// 提示用户参数设置错误
		MessageBox("参数设置错误!", "系统提示" , MB_ICONINFORMATION | MB_OK);
		
		// 返回
		return;
	}
	
	CDialog::OnOK();
}

⌨️ 快捷键说明

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