-
Notifications
You must be signed in to change notification settings - Fork 0
/
MCDLG.cpp
90 lines (69 loc) · 1.62 KB
/
MCDLG.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
// mncdlg.cpp : implementation file
//
#include "stdafx.h"
#include "psx.h"
#include "mncdlg.h"
#include "float.h"
#include "calc.h"
#include "prot.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMncDlg dialog
CMncDlg::CMncDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMncDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CMncDlg)
m_mnchia = "";
m_mnchib = "";
m_ergtx1 = "";
m_ergtx2 = "";
//}}AFX_DATA_INIT
}
void CMncDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMncDlg)
DDX_Text(pDX, IDC_B, m_mnchia);
DDX_Text(pDX, IDC_C, m_mnchib);
DDX_Text(pDX, IDC_ERG1_TX, m_ergtx1);
DDX_Text(pDX, IDC_ERG2_TX, m_ergtx2);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CMncDlg, CDialog)
//{{AFX_MSG_MAP(CMncDlg)
ON_BN_CLICKED(IDC_BERECH, OnClickedBerech)
ON_BN_CLICKED(IDC_NEU, OnClickedNeu)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CMncDlg message handlers
void CMncDlg::OnClickedBerech()
{
long cxc,cyb;
double cmhin,rose;
char as1[20]=" ";
char as2[20]=" ";
calc cal;
UpdateData(TRUE);
cxc = atol(m_mnchib);
cyb = atol(m_mnchia);
cal.mnc(cyb,cxc);
cmhin = cal.chi;
rose = cal.zwer;
sprintf(as2," p = %8.4lf",rose);
sprintf(as1," Chi = %8.4lf",cmhin);
m_ergtx1 = as1;
m_ergtx2 = as2;
UpdateData(FALSE);
}
void CMncDlg::OnClickedNeu()
{
m_mnchia = "";
m_mnchib = "";
m_ergtx1="";
m_ergtx2="",
UpdateData(FALSE);
}