-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathBtm.cpp
63 lines (48 loc) · 1.49 KB
/
Btm.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
// Btm.cpp : implementation file
//
#include "stdafx.h"
#include "ColorEyeI.h"
#include "Btm.h"
#include "MsrTableDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBtm
CBtm::CBtm()
{
}
CBtm::~CBtm()
{
}
BEGIN_MESSAGE_MAP(CBtm, CButton)
//{{AFX_MSG_MAP(CBtm)
ON_WM_MOUSEMOVE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBtm message handlers
void CBtm::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CMsrTableDlg* pDlgMsrTable = dynamic_cast<CMsrTableDlg*>(GetOwner());
if ( checkKeyBtnText("TPV OQC" ) ) pDlgMsrTable->SetTableImage(TI_OQC_MASS_TPV);
else if ( checkKeyBtnText("SEC OQC" ) ) pDlgMsrTable->SetTableImage(TI_OQC_MASS_SEC);
else if ( checkKeyBtnText("¤¯Ä_ OQC" ) ) pDlgMsrTable->SetTableImage(TI_QOC_MASS_NIBO);
else if ( checkKeyBtnText("SEC From") ) pDlgMsrTable->SetTableImage(TI_SEC_From);
else if ( checkKeyBtnText("¸Õ²£" ) ) pDlgMsrTable->SetTableImage(TI_OQC_TEST);
else if ( checkKeyBtnText("RA" ) ) pDlgMsrTable->SetTableImage(TI_RA);
else
CButton::OnMouseMove(nFlags, point);
}
BOOL CBtm::checkKeyBtnText(const CString& keyText)
{
CString btnText;
GetWindowText(btnText);
if (btnText.Find(keyText) != -1)
return TRUE;
else
return FALSE;
}