-
Notifications
You must be signed in to change notification settings - Fork 6
/
TTPropertyPage.cpp
78 lines (59 loc) · 1.75 KB
/
TTPropertyPage.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
// TTPropertyPage.cpp : implementation file
//
#include "TTPropertyPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTTPropertyPage property page
IMPLEMENT_DYNCREATE(CTTPropertyPage, CPropertyPage)
CTTPropertyPage::CTTPropertyPage() : CPropertyPage()
{
}
CTTPropertyPage::CTTPropertyPage(UINT uID) : CPropertyPage(uID)
{
//{{AFX_DATA_INIT(CTTPropertyPage)
// NOTE: the ClassWizard will add member initialization here
m_bBoldTips = FALSE;
m_bSetMaxWidth = FALSE;
m_nMaxWidth = 0;
//}}AFX_DATA_INIT
}
CTTPropertyPage::~CTTPropertyPage()
{
}
void CTTPropertyPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTTPropertyPage)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTTPropertyPage, CPropertyPage)
//{{AFX_MSG_MAP(CTTPropertyPage)
//}}AFX_MSG_MAP
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTTPropertyPage message handlers
BOOL CTTPropertyPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// initialize the tooltip
m_toolTip.Create(this);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CTTPropertyPage::OnToolTipNotify(UINT /*id*/, NMHDR* /*pNMHDR*/, LRESULT* /*pResult*/)
{
// TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
// UINT uID = pNMHDR->idFrom;
return FALSE;
}
BOOL CTTPropertyPage::PreTranslateMessage( MSG *pMsg )
{
m_toolTip.RelayEvent(pMsg);
return CPropertyPage::PreTranslateMessage(pMsg);
}