JunkBox_Win_Lib 1.5.3
Loading...
Searching...
No Matches
CInputMultiFloatNumDLG Class Reference

#include <InputNumDLG.h>

Inheritance diagram for CInputMultiFloatNumDLG:
Collaboration diagram for CInputMultiFloatNumDLG:

Public Types

enum  { IDD = IDD_MLT_INPNUM_DLG }
 

Public Member Functions

 CInputMultiFloatNumDLG (CWnd *pParent=NULL)
 
 CInputMultiFloatNumDLG (LPCTSTR t0, double v0=0., LPCTSTR t1=NULL, double v1=0., LPCTSTR t2=NULL, double v2=0., LPCTSTR t3=NULL, double v3=0., LPCTSTR t4=NULL, double v4=0., LPCTSTR t5=NULL, double v5=0., CWnd *pParent=NULL)
 
virtual ~CInputMultiFloatNumDLG ()
 
virtual BOOL OnInitDialog ()
 

Public Attributes

CStatic * valtlBox [6]
 
CEdit * valBox [6]
 
CString valtl [6]
 
double val [6]
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
 
virtual void OnOK ()
 

Detailed Description

Definition at line 89 of file InputNumDLG.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 102 of file InputNumDLG.h.

Constructor & Destructor Documentation

◆ CInputMultiFloatNumDLG() [1/2]

CInputMultiFloatNumDLG ( CWnd * pParent = NULL)

Definition at line 181 of file InputNumDLG.cpp.

182 : CDialog(CInputMultiFloatNumDLG::IDD, pParent)
183{
184 for (int i=0; i<6; i++) {
185 valtlBox[i] = NULL;
186 valBox[i] = NULL;
187 valtl[i] = _T("");
188 val[i] = 0.0;
189 }
190}

◆ CInputMultiFloatNumDLG() [2/2]

CInputMultiFloatNumDLG ( LPCTSTR t0,
double v0 = 0.,
LPCTSTR t1 = NULL,
double v1 = 0.,
LPCTSTR t2 = NULL,
double v2 = 0.,
LPCTSTR t3 = NULL,
double v3 = 0.,
LPCTSTR t4 = NULL,
double v4 = 0.,
LPCTSTR t5 = NULL,
double v5 = 0.,
CWnd * pParent = NULL )

Definition at line 194 of file InputNumDLG.cpp.

196 : CDialog(CInputMultiFloatNumDLG::IDD, pParent)
197{
198 for (int i=0; i<6; i++) {
199 valtlBox[i] = NULL;
200 valBox[i] = NULL;
201 }
202
203 valtl[0] = t0;
204 valtl[1] = t1;
205 valtl[2] = t2;
206 valtl[3] = t3;
207 valtl[4] = t4;
208 valtl[5] = t5;
209 val[0] = v0;
210 val[1] = v1;
211 val[2] = v2;
212 val[3] = v3;
213 val[4] = v4;
214 val[5] = v5;
215}

References CInputMultiFloatNumDLG::val, CInputMultiFloatNumDLG::valBox, CInputMultiFloatNumDLG::valtl, and CInputMultiFloatNumDLG::valtlBox.

◆ ~CInputMultiFloatNumDLG()

~CInputMultiFloatNumDLG ( )
virtual

Definition at line 219 of file InputNumDLG.cpp.

220{
221}

Member Function Documentation

◆ DoDataExchange()

void DoDataExchange ( CDataExchange * pDX)
protectedvirtual

Definition at line 225 of file InputNumDLG.cpp.

226{
227 CDialog::DoDataExchange(pDX);
228}

◆ OnInitDialog()

BOOL OnInitDialog ( )
virtual

Definition at line 240 of file InputNumDLG.cpp.

241{
242 valtlBox[0] = (CStatic*)GetDlgItem(IDC_INM_MLT_VALTTL0);
243 valtlBox[1] = (CStatic*)GetDlgItem(IDC_INM_MLT_VALTTL1);
244 valtlBox[2] = (CStatic*)GetDlgItem(IDC_INM_MLT_VALTTL2);
245 valtlBox[3] = (CStatic*)GetDlgItem(IDC_INM_MLT_VALTTL3);
246 valtlBox[4] = (CStatic*)GetDlgItem(IDC_INM_MLT_VALTTL4);
247 valtlBox[5] = (CStatic*)GetDlgItem(IDC_INM_MLT_VALTTL5);
248
249 valBox[0] = (CEdit*)GetDlgItem(IDC_INM_MLT_VAL0);
250 valBox[1] = (CEdit*)GetDlgItem(IDC_INM_MLT_VAL1);
251 valBox[2] = (CEdit*)GetDlgItem(IDC_INM_MLT_VAL2);
252 valBox[3] = (CEdit*)GetDlgItem(IDC_INM_MLT_VAL3);
253 valBox[4] = (CEdit*)GetDlgItem(IDC_INM_MLT_VAL4);
254 valBox[5] = (CEdit*)GetDlgItem(IDC_INM_MLT_VAL5);
255
256 TCHAR buf[LMNAME];
257// memset(buf, 0, LNAME);
258
259 for (int i=0; i<6; i++) {
260 if (valtl[i]!=_T("")) {
261 valtlBox[i]->SetWindowText(valtl[i]);
262 sntprintf(buf, LMNAME, _T("%8f"), val[i]);
263 valBox[i]->SetWindowText(buf);
264 }
265 else {
266 CString mesg;
267 mesg.LoadString(IDS_STR_UNUSED);
268 valtlBox[i]->SetWindowText(mesg);
269 valtlBox[i]->EnableWindow(FALSE);
270 valBox[i]->SetWindowText(_T("0.0"));
271 valBox[i]->EnableWindow(FALSE);
272 }
273 }
274
275 return TRUE;
276}
#define IDC_INM_MLT_VALTTL5
Definition resource.h:57
#define IDC_INM_MLT_VAL3
Definition resource.h:54
#define IDC_INM_MLT_VALTTL2
Definition resource.h:51
#define IDC_INM_MLT_VALTTL0
Definition resource.h:47
#define IDC_INM_MLT_VAL0
Definition resource.h:48
#define IDC_INM_MLT_VALTTL1
Definition resource.h:49
#define IDC_INM_MLT_VALTTL3
Definition resource.h:53
#define IDC_INM_MLT_VAL4
Definition resource.h:56
#define IDC_INM_MLT_VALTTL4
Definition resource.h:55
#define IDC_INM_MLT_VAL5
Definition resource.h:58
#define IDC_INM_MLT_VAL1
Definition resource.h:50
#define IDS_STR_UNUSED
Definition resource.h:100
#define IDC_INM_MLT_VAL2
Definition resource.h:52

References IDC_INM_MLT_VAL0, IDC_INM_MLT_VAL1, IDC_INM_MLT_VAL2, IDC_INM_MLT_VAL3, IDC_INM_MLT_VAL4, IDC_INM_MLT_VAL5, IDC_INM_MLT_VALTTL0, IDC_INM_MLT_VALTTL1, IDC_INM_MLT_VALTTL2, IDC_INM_MLT_VALTTL3, IDC_INM_MLT_VALTTL4, IDC_INM_MLT_VALTTL5, and IDS_STR_UNUSED.

◆ OnOK()

void OnOK ( )
protectedvirtual

Definition at line 280 of file InputNumDLG.cpp.

281{
282 TCHAR buf[LMNAME];
283// memset(buf, 0, LNAME);
284
285 for (int i=0; i<6; i++) {
286 valBox[i]->GetWindowText(buf, LMNAME);
287 val[i] = ttof(buf);
288 }
289
290 CDialog::OnOK();
291 return;
292}

References CInputMultiFloatNumDLG::val, and CInputMultiFloatNumDLG::valBox.

Member Data Documentation

◆ val

◆ valBox

CEdit* valBox[6]

◆ valtl

CString valtl[6]

Definition at line 112 of file InputNumDLG.h.

Referenced by CInputMultiFloatNumDLG::CInputMultiFloatNumDLG().

◆ valtlBox

CStatic* valtlBox[6]

Definition at line 109 of file InputNumDLG.h.

Referenced by CInputMultiFloatNumDLG::CInputMultiFloatNumDLG().


The documentation for this class was generated from the following files: