-
Notifications
You must be signed in to change notification settings - Fork 63
/
cDlgMorphErosion.cpp
115 lines (98 loc) · 3 KB
/
cDlgMorphErosion.cpp
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// cDlgMorphErosion.cpp : implementation file
//
#include "stdafx.h"
#include "DIPDemo.h"
#include "cDlgMorphErosion.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// cDlgMorphErosion dialog
cDlgMorphErosion::cDlgMorphErosion(CWnd* pParent /*=NULL*/)
: CDialog(cDlgMorphErosion::IDD, pParent)
{
//{{AFX_DATA_INIT(cDlgMorphErosion)
m_nMode = -1;
m_nStructure1 = -1;
m_nStructure2 = -1;
m_nStructure3 = -1;
m_nStructure4 = -1;
m_nStructure5 = -1;
m_nStructure6 = -1;
m_nStructure7 = -1;
m_nStructure8 = -1;
m_nStructure9 = -1;
//}}AFX_DATA_INIT
}
void cDlgMorphErosion::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(cDlgMorphErosion)
DDX_Control(pDX, IDC_Structure9, m_Control9);
DDX_Control(pDX, IDC_Structure8, m_Control8);
DDX_Control(pDX, IDC_Structure7, m_Control7);
DDX_Control(pDX, IDC_Structure6, m_Control6);
DDX_Control(pDX, IDC_Structure5, m_Control5);
DDX_Control(pDX, IDC_Structure4, m_Control4);
DDX_Control(pDX, IDC_Structure3, m_Control3);
DDX_Control(pDX, IDC_Structure2, m_Control2);
DDX_Control(pDX, IDC_Structure1, m_Control1);
DDX_Radio(pDX, IDC_Hori, m_nMode);
DDX_Radio(pDX, IDC_Structure1, m_nStructure1);
DDX_Radio(pDX, IDC_Structure2, m_nStructure2);
DDX_Radio(pDX, IDC_Structure3, m_nStructure3);
DDX_Radio(pDX, IDC_Structure4, m_nStructure4);
DDX_Radio(pDX, IDC_Structure5, m_nStructure5);
DDX_Radio(pDX, IDC_Structure6, m_nStructure6);
DDX_Radio(pDX, IDC_Structure7, m_nStructure7);
DDX_Radio(pDX, IDC_Structure8, m_nStructure8);
DDX_Radio(pDX, IDC_Structure9, m_nStructure9);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(cDlgMorphErosion, CDialog)
//{{AFX_MSG_MAP(cDlgMorphErosion)
ON_BN_CLICKED(IDC_custom, Oncustom)
ON_BN_CLICKED(IDC_Vert, OnVert)
ON_BN_CLICKED(IDC_Hori, OnHori)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// cDlgMorphErosion message handlers
void cDlgMorphErosion::Oncustom()
{
m_Control1.EnableWindow(TRUE);
m_Control2.EnableWindow(TRUE);
m_Control3.EnableWindow(TRUE);
m_Control4.EnableWindow(TRUE);
m_Control5.EnableWindow(TRUE);
m_Control6.EnableWindow(TRUE);
m_Control7.EnableWindow(TRUE);
m_Control8.EnableWindow(TRUE);
m_Control9.EnableWindow(TRUE);
}
void cDlgMorphErosion::OnVert()
{
m_Control1.EnableWindow(FALSE);
m_Control2.EnableWindow(FALSE);
m_Control3.EnableWindow(FALSE);
m_Control4.EnableWindow(FALSE);
m_Control5.EnableWindow(FALSE);
m_Control6.EnableWindow(FALSE);
m_Control7.EnableWindow(FALSE);
m_Control8.EnableWindow(FALSE);
m_Control9.EnableWindow(FALSE);
}
void cDlgMorphErosion::OnHori()
{
m_Control1.EnableWindow(FALSE);
m_Control2.EnableWindow(FALSE);
m_Control3.EnableWindow(FALSE);
m_Control4.EnableWindow(FALSE);
m_Control5.EnableWindow(FALSE);
m_Control6.EnableWindow(FALSE);
m_Control7.EnableWindow(FALSE);
m_Control8.EnableWindow(FALSE);
m_Control9.EnableWindow(FALSE);
}