-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGrayEnhDlg.cpp
More file actions
executable file
·67 lines (53 loc) · 1.47 KB
/
GrayEnhDlg.cpp
File metadata and controls
executable file
·67 lines (53 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// GrayEnhDlg.cpp : implementation file
//
#include "stdafx.h"
#include "FYF.h"
#include "GrayEnhDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGrayEnhDlg dialog
CGrayEnhDlg::CGrayEnhDlg(CWnd* pParent /*=NULL*/)
: CDialog(CGrayEnhDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CGrayEnhDlg)
m_oralow = 0;
m_orahig = 0;
m_newhig = 0;
m_newlow = 0;
//}}AFX_DATA_INIT
}
void CGrayEnhDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CGrayEnhDlg)
DDX_Text(pDX, IDC_EDIT1, m_oralow);
DDX_Text(pDX, IDC_EDIT2, m_orahig);
DDX_Text(pDX, IDC_EDIT3, m_newhig);
DDX_Text(pDX, IDC_EDIT4, m_newlow);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CGrayEnhDlg, CDialog)
//{{AFX_MSG_MAP(CGrayEnhDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGrayEnhDlg message handlers
void CGrayEnhDlg::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();
}