-
Notifications
You must be signed in to change notification settings - Fork 77
/
TToolTip.h
45 lines (34 loc) · 1.79 KB
/
TToolTip.h
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
/*****************************************************************************/
/* TToolTip.h Copyright (c) Ladislav Zezula 2014 */
/*---------------------------------------------------------------------------*/
/* Interface to class TTooltip, used as helper for displaying flags */
/*---------------------------------------------------------------------------*/
/* Date Ver Who Comment */
/* -------- ---- --- ------- */
/* 16.03.14 1.00 Lad The first version of TToolTip.h */
/*****************************************************************************/
#ifndef __TTOOLTIP_H__
#define __TTOOLTIP_H__
//-----------------------------------------------------------------------------
// Definition of the TTooltip class
class TToolTip
{
public:
TToolTip();
~TToolTip();
// Initializes the tooltip. Call once per application
BOOL Initialize(HINSTANCE hInst, HWND hWndParent);
void Destroy();
// Adds a flag-based tooltip for the specified child window
BOOL AddToolTip(HWND hDlg, UINT nIDCtrl, TFlagInfo * pFlags);
BOOL AddToolTip(HWND hDlg, UINT nIDCtrl, UINT nIDTip);
// Handles all messages
LRESULT HandleMessages(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL * pbHandled);
protected:
BOOL AddToolTipInternal(HWND hDlg, UINT nIDCtrl, LPCTSTR szTip, TFlagInfo * pFlags);
void OnGetTooltipText(LPNMTTDISPINFO pTTDispInfo);
LPTSTR szToolTipText; // Text for preparing the buffer
size_t cchTooltipText; // Length of the buffer
HWND hWndToolTip; // Handle to the tooltip window
};
#endif // __TTOOLTIP_H__