📄 perfstatistics.cpp
字号:
// PerfStatistics.cpp : implementation file
//
#include "stdafx.h"
#include "..\nms.h"
#include "PerfStatistics.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CBrush *g_pWhiteBrush; /* 背景颜色 */
/////////////////////////////////////////////////////////////////////////////
// CPerfStatistics dialog
CPerfStatistics::CPerfStatistics(CWnd* pParent /*=NULL*/)
: CDialog(CPerfStatistics::IDD, pParent)
{
//{{AFX_DATA_INIT(CPerfStatistics)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CPerfStatistics::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPerfStatistics)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPerfStatistics, CDialog)
//{{AFX_MSG_MAP(CPerfStatistics)
ON_WM_CTLCOLOR()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPerfStatistics message handlers
void CPerfStatistics::OnPerfStaRefresh()
{
CString str;
str.Format("%d" , m_PerfNum);
GetDlgItem(IDC_STAT_PERF_NUM)->SetWindowText(str);
str.Format("%d" , m_p3nPerfNum);
GetDlgItem(IDC_STAT_3N_PERF_NUM)->SetWindowText(str);
str.Format("%d" , m_tem28PerfNum);
GetDlgItem(IDC_STAT_TEM28_PERF_NUM)->SetWindowText(str);
UpdateData();
}
void CPerfStatistics::OnPerfStaReset()
{
ClearPerf();
OnPerfStaRefresh();
}
HBRUSH CPerfStatistics::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH)g_pWhiteBrush->m_hObject;
// TODO: Return a different brush if the default is not desired
//return hbr;
}
BOOL CPerfStatistics::OnInitDialog()
{
CDialog::OnInitDialog();
OnPerfStaRefresh();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -