?? grayenhance.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 + -