-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCKPReactionPg1.h
187 lines (147 loc) · 4.2 KB
/
CKPReactionPg1.h
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// CKPReactionPg1.h : header file
//
// $Id$
//////////////////////////////////////////////////////////////////////
//{{AFX_INCLUDES()
#include "mshflexgrid.h"
//}}AFX_INCLUDES
#ifndef __CKPREACTIONPG1_H__
#define __CKPREACTIONPG1_H__
/////////////////////////////////////////////////////////////////////////////
// CCKPReactionPg1 dialog
#include "CheckListCtrl.h"
#include "EditGrid.h"
#include "GridListDoc.h"
#include "KeywordPageListItems.h"
#include "CommonKeywordPage.h"
#ifndef baseCKPReactionPg1
#define baseCKPReactionPg1 CCommonKeywordPage
#endif
class CCKPReactionPg1 : public baseCKPReactionPg1
{
DECLARE_DYNCREATE(CCKPReactionPg1)
DECLARE_LAYOUT();
public:
std::list<CNameCoef> m_listNameCoef;
// Construction
public:
CCKPReactionPg1();
~CCKPReactionPg1();
// Dialog Data
//{{AFX_DATA(CCKPReactionPg1)
enum { IDD = IDD_KEY_REACTION_PG1 };
CCheckListCtrl m_ctrlPhaseCheckList;
CEditGrid m_ctrlReactionEditGrid;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CCKPReactionPg1)
public:
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
protected:
void DDX_NameCoefList(CDataExchange* pDX, int nIDC);
void InitGrid();
protected:
CGridListDoc m_glDoc;
bool m_bComboFilledOnce;
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CCKPReactionPg1)
virtual BOOL OnInitDialog();
afx_msg void OnItemchangedClPhase(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnKeyDownMshfgReaction(short FAR* KeyCode, short Shift);
afx_msg void OnEnterCellMshfgReaction();
afx_msg void OnEnterCellMshfgNumDesc();
afx_msg void OnSetfocusClPhase(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
// custom grid handlers
afx_msg LRESULT OnBeginCellEdit(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnEndCellEdit(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnSetfocusGrid(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CCKPReactionPg2 dialog
#ifndef baseCKPReactionPg2
#define baseCKPReactionPg2 CCommonKeywordPage
#endif
class CCKPReactionPg2 : public baseCKPReactionPg2
{
DECLARE_DYNCREATE(CCKPReactionPg2)
public:
enum amountType
{
TYPE_LINEAR,
TYPE_LIST
} m_nType;
enum unitType
{
UNITS_MICROMOLES = 0,
UNITS_MILLIMOLES = 1,
UNITS_MOLES = 2
} m_nUnits;
int m_nLinearSteps;
double m_dLinearAmt;
std::list<double> m_listSteps;
// Construction
public:
CCKPReactionPg2();
~CCKPReactionPg2();
// Dialog Data
//{{AFX_DATA(CCKPReactionPg2)
enum { IDD = IDD_KEY_REACTION_PG2 };
CEdit m_eRxnAmt;
CSpinButtonCtrl m_spinSteps;
CComboBox m_cboUnitsSteps;
CComboBox m_cboUnitsLinear;
CEdit m_eSteps;
CEditGrid m_ctrlStepEditGrid;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CCKPReactionPg2)
public:
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
protected:
void DDX_Steps(CDataExchange* pDX, int nIDC);
protected:
void UpdateRadioState();
void EnableLinear(BOOL bEnable);
void EnableList(BOOL bEnable);
void InitCombos();
void InitSpin();
void InitStepEditGrid();
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CCKPReactionPg2)
virtual BOOL OnInitDialog();
afx_msg void OnEnterCellMshfgNumDesc();
afx_msg void OnEnterCellMshfgList();
afx_msg void OnKeyDownMshfgList(short FAR* KeyCode, short Shift);
afx_msg void OnSetfocusERxnAmt();
afx_msg void OnSetfocusCboLinearUnits();
afx_msg void OnSetfocusESteps();
afx_msg void OnSetfocusCboListUnits();
afx_msg void OnRadioLinear();
afx_msg void OnRadioList();
afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
// custom radio button setfocus handlers
afx_msg void OnSetfocusRadioLinear();
afx_msg void OnSetfocusRadioList();
// custom grid handlers
afx_msg LRESULT OnBeginCellEdit(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnEndCellEdit(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnSetfocusGrid(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
#endif // __CKPREACTIONPG1_H__