-
Notifications
You must be signed in to change notification settings - Fork 2
/
PassageOptions.cpp
121 lines (107 loc) · 2.7 KB
/
PassageOptions.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
115
116
117
118
119
120
121
// PassageOptions.cpp : implementation file
//
#include "stdafx.h"
#include "onstation.h"
#include "PassageOptions.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPassageOptions dialog
CPassageOptions::CPassageOptions(CWnd* pParent /*=NULL*/)
: CDialog(CPassageOptions::IDD, pParent)
{
//{{AFX_DATA_INIT(CPassageOptions)
m_bMultipleLights = FALSE;
m_bDisableLightRotate = FALSE;
m_bWireFrameRotate = FALSE;
//}}AFX_DATA_INIT
}
void CPassageOptions::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPassageOptions)
DDX_Control(pDX, IDC_COMBO2, m_ComboBox);
DDX_Check(pDX, IDC_MULTIPLELIGHTS, m_bMultipleLights);
DDX_Check(pDX, IDC_DISABLELIGHTROTATE, m_bDisableLightRotate);
DDX_Check(pDX, IDC_CHECK2, m_bWireFrameRotate);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPassageOptions, CDialog)
//{{AFX_MSG_MAP(CPassageOptions)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPassageOptions message handlers
BOOL CPassageOptions::OnInitDialog()
{
CDialog::OnInitDialog();
// m_ComboBox.ResetContent();
// CString CS;
// CS.LoadString(IDS_PT_LINE_PLOT);
// m_ComboBox.AddString(CS);
// CS.LoadString(IDS_PT_HEIGHTS);
// m_ComboBox.AddString(CS);
// CS.LoadString(IDS_PT_WIDTHS);
// m_ComboBox.AddString(CS);
// CS.LoadString(IDS_PT_CROSS_SECTIONS);
// m_ComboBox.AddString(CS);
// CS.LoadString(IDS_PT_FULL_PASSAGES_SKINNY);
// m_ComboBox.AddString(CS);
// CS.LoadString(IDS_PT_FULL_PASSAGES);
// m_ComboBox.AddString(CS);
int iCurComboSel=0;
switch (m_PassageType)
{
case PT_LINE_PLOT:
iCurComboSel=0;
break;
case PT_HEIGHTS:
iCurComboSel=1;
break;
case PT_WIDTHS:
iCurComboSel=2;
break;
case PT_CROSS_SECTIONS:
iCurComboSel=3;
break;
case PT_FULL_PASSAGES_SKINNY:
iCurComboSel=4;
break;
case PT_FULL_PASSAGES:
iCurComboSel=5;
break;
default:
ASSERT(FALSE);
}
m_ComboBox.SetCurSel(iCurComboSel);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPassageOptions::OnOK()
{
switch (m_ComboBox.GetCurSel())
{
case 0:
m_PassageType=PT_LINE_PLOT;
break;
case 1:
m_PassageType=PT_HEIGHTS;
break;
case 2:
m_PassageType=PT_WIDTHS;
break;
case 3:
m_PassageType=PT_CROSS_SECTIONS;
break;
case 4:
m_PassageType=PT_FULL_PASSAGES_SKINNY;
break;
case 5:
m_PassageType=PT_FULL_PASSAGES;
break;
}
CDialog::OnOK();
}