📄 testresult.cpp
字号:
// TestResult.cpp : implementation file
//
#include "stdafx.h"
#include "NoteBook.h"
#include "TestResult.h"
#include "CpuMsg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTestResult dialog
CTestResult::CTestResult(CWnd* pParent /*=NULL*/)
: CDialog(CTestResult::IDD, pParent)
{
//{{AFX_DATA_INIT(CTestResult)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
//
}
void CTestResult::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTestResult)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTestResult, CDialog)
//{{AFX_MSG_MAP(CTestResult)
ON_BN_CLICKED(IDC_PASS, OnPass)
ON_BN_CLICKED(IDC_FAIL, OnFail)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTestResult message handlers
void CTestResult::OnPass()
{
// TODO: Add your control notification handler code here
::SetDlgItemText(::FindWindow(NULL,"CPU、电池信息检验"),IDC_EDIT1,
"电池测试成功");
::SendMessage(::FindWindow(NULL,"BatteryMon - [交流电源]"),
WM_SYSCOMMAND, SC_CLOSE, 0);
SendMessage(WM_SYSCOMMAND,SC_CLOSE,0);
ShellExecute(NULL,"open","D:\\测试工具\\CPU测试\\CPU信息检测\\cpuz\\cpuz.exe",
NULL,NULL,SW_SHOW);
}
void CTestResult::OnFail()
{
// TODO: Add your control notification handler code here
::SetDlgItemText(::FindWindow(NULL,"CPU、电池信息检验"),IDC_EDIT1,
"电池测试失败");
::SendMessage(::FindWindow(NULL,"BatteryMon - [交流电源]"),
WM_SYSCOMMAND, SC_CLOSE, 0);
SendMessage(WM_SYSCOMMAND,SC_CLOSE,0);
ShellExecute(NULL,"open","D:\\测试工具\\CPU测试\\CPU信息检测\\cpuz\\cpuz.exe",
NULL,NULL,SW_SHOW);
}
BOOL CTestResult::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
MoveWindow(139,468,296,148,TRUE);
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 + -