-
Notifications
You must be signed in to change notification settings - Fork 2
/
Statistic.cpp
executable file
·78 lines (69 loc) · 1.87 KB
/
Statistic.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
// Statistic.cpp : implementation file
//
#include "stdafx.h"
#include "pex32.h"
#include "Encoder.h"
#include "Decoder.h"
#include "Hardware.h"
#include "Statistic.h"
#include "Set.h"
#include "Filter.h"
#include "ListManager.h"
#include "Options.h"
#include "SetGeneral.h"
#include "MyStatusBar.h"
#include "MainFrm.h"
#include "Listen.h"
#include "aliases.h"
#include "MyMessageBox.h"
#include "Pex32Doc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CPex32Doc *pPex32Doc;
/////////////////////////////////////////////////////////////////////////////
// CStatistic property page
IMPLEMENT_DYNCREATE (CStatistic, CPropertyPage) CStatistic::CStatistic ():CPropertyPage (CStatistic::
IDD)
{
//{{AFX_DATA_INIT(CStatistic)
m_rxbuferr = _T ("");
m_msgerr = _T ("");
m_msgnum = _T ("");
m_decrate = _T ("");
//}}AFX_DATA_INIT
}
CStatistic::~CStatistic ()
{
}
void
CStatistic::DoDataExchange (CDataExchange * pDX)
{
CPropertyPage::DoDataExchange (pDX);
//{{AFX_DATA_MAP(CStatistic)
DDX_Text (pDX, IDC_EXBUFERR, m_rxbuferr);
DDX_Text (pDX, IDC_MSGERR, m_msgerr);
DDX_Text (pDX, IDC_MSGNUM, m_msgnum);
DDX_Text (pDX, IDC_DECRATE, m_decrate);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP (CStatistic, CPropertyPage)
//{{AFX_MSG_MAP(CStatistic)
//}}AFX_MSG_MAP
END_MESSAGE_MAP ()
/////////////////////////////////////////////////////////////////////////////
// CStatistic message handlers
BOOL CStatistic::OnNotify (WPARAM wParam, LPARAM lParam,
LRESULT * pResult)
{
TRACE ("OnNotify\n");
m_rxbuferr.Format ("%d", pPex32Doc->m_buferr);
m_msgnum.Format ("%d", pPex32Doc->m_msgrx);
m_msgerr.Format ("%d", pPex32Doc->m_msgerr);
if (pPex32Doc->m_msgrx)
m_decrate.Format ("%d%%",
100 - (pPex32Doc->m_msgerr * 100 / pPex32Doc->m_msgrx));
return CPropertyPage::OnNotify (wParam, lParam, pResult);
}