ReactOS 0.4.15-dev-7942-gd23573b
tooltips.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wine/unicode.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "commctrl.h"
#include "comctl32.h"
#include "wine/debug.h"
Include dependency graph for tooltips.c:

Go to the source code of this file.

Classes

struct  TTTOOL_INFO
 
struct  TOOLTIPS_INFO
 

Macros

#define ID_TIMERSHOW   1 /* show delay timer */
 
#define ID_TIMERPOP   2 /* auto pop timer */
 
#define ID_TIMERLEAVE   3 /* tool leave timer */
 
#define TOOLTIPS_GetInfoPtr(hWindow)   ((TOOLTIPS_INFO *)GetWindowLongPtrW (hWindow, 0))
 
#define NORMAL_TEXT_MARGIN   2
 
#define BALLOON_TEXT_MARGIN   (NORMAL_TEXT_MARGIN+8)
 
#define BALLOON_ROUNDEDNESS   20
 
#define BALLOON_STEMHEIGHT   13
 
#define BALLOON_STEMWIDTH   10
 
#define BALLOON_STEMINDENT   20
 
#define BALLOON_ICON_TITLE_SPACING   8 /* horizontal spacing between icon and title */
 
#define BALLOON_TITLE_TEXT_SPACING   8 /* vertical spacing between icon/title and main text */
 
#define ICON_HEIGHT   16
 
#define ICON_WIDTH   16
 
#define MAX_TEXT_SIZE_A   80 /* maximum retrieving text size by ANSI message */
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (tooltips)
 
static LRESULT CALLBACK TOOLTIPS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uId, DWORD_PTR dwRef)
 
static BOOL TOOLTIPS_IsCallbackString (LPCWSTR str, BOOL isW)
 
static UINT_PTR TOOLTIPS_GetTitleIconIndex (HICON hIcon)
 
static void TOOLTIPS_InitSystemSettings (TOOLTIPS_INFO *infoPtr)
 
static void TOOLTIPS_customdraw_fill (const TOOLTIPS_INFO *infoPtr, NMTTCUSTOMDRAW *lpnmttcd, HDC hdc, const RECT *rcBounds, UINT uFlags)
 
static DWORD TOOLTIPS_notify_customdraw (DWORD dwDrawStage, NMTTCUSTOMDRAW *lpnmttcd)
 
static void TOOLTIPS_Refresh (const TOOLTIPS_INFO *infoPtr, HDC hdc)
 
static void TOOLTIPS_GetDispInfoA (const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr, WCHAR *buffer)
 
static void TOOLTIPS_GetDispInfoW (const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr, WCHAR *buffer)
 
static void TOOLTIPS_GetTipText (const TOOLTIPS_INFO *infoPtr, INT nTool, WCHAR *buffer)
 
static void TOOLTIPS_CalcTipSize (const TOOLTIPS_INFO *infoPtr, LPSIZE lpSize)
 
static void TOOLTIPS_Show (TOOLTIPS_INFO *infoPtr, BOOL track_activate)
 
static void TOOLTIPS_Hide (TOOLTIPS_INFO *infoPtr)
 
static void TOOLTIPS_TrackShow (TOOLTIPS_INFO *infoPtr)
 
static void TOOLTIPS_TrackHide (const TOOLTIPS_INFO *infoPtr)
 
static INT TOOLTIPS_GetToolFromInfoT (const TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo)
 
static INT TOOLTIPS_GetToolFromPoint (const TOOLTIPS_INFO *infoPtr, HWND hwnd, const POINT *lpPt)
 
static void TOOLTIPS_CopyInfoT (const TOOLTIPS_INFO *infoPtr, INT index, TTTOOLINFOW *ti, BOOL isW)
 
static BOOL TOOLTIPS_IsWindowActive (HWND hwnd)
 
static INT TOOLTIPS_CheckTool (const TOOLTIPS_INFO *infoPtr, BOOL bShowTest)
 
static LRESULT TOOLTIPS_Activate (TOOLTIPS_INFO *infoPtr, BOOL activate)
 
static LRESULT TOOLTIPS_AddToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
 
static void TOOLTIPS_ResetSubclass (const TTTOOL_INFO *toolPtr)
 
static LRESULT TOOLTIPS_DelToolT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_EnumToolsT (const TOOLTIPS_INFO *infoPtr, UINT uIndex, TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_GetBubbleSize (const TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo)
 
static LRESULT TOOLTIPS_GetCurrentToolT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_GetDelayTime (const TOOLTIPS_INFO *infoPtr, DWORD duration)
 
static LRESULT TOOLTIPS_GetMargin (const TOOLTIPS_INFO *infoPtr, RECT *rect)
 
static LRESULT TOOLTIPS_GetMaxTipWidth (const TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_GetTextT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_GetTipBkColor (const TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_GetTipTextColor (const TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_GetToolCount (const TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_GetToolInfoT (const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_HitTestT (const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit, BOOL isW)
 
static LRESULT TOOLTIPS_NewToolRectT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti)
 
static LRESULT TOOLTIPS_Pop (TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_RelayEvent (TOOLTIPS_INFO *infoPtr, LPMSG lpMsg)
 
static LRESULT TOOLTIPS_SetDelayTime (TOOLTIPS_INFO *infoPtr, DWORD duration, INT nTime)
 
static LRESULT TOOLTIPS_SetMargin (TOOLTIPS_INFO *infoPtr, const RECT *rect)
 
static LRESULT TOOLTIPS_SetMaxTipWidth (TOOLTIPS_INFO *infoPtr, INT MaxWidth)
 
static LRESULT TOOLTIPS_SetTipBkColor (TOOLTIPS_INFO *infoPtr, COLORREF clrBk)
 
static LRESULT TOOLTIPS_SetTipTextColor (TOOLTIPS_INFO *infoPtr, COLORREF clrText)
 
static LRESULT TOOLTIPS_SetTitleT (TOOLTIPS_INFO *infoPtr, UINT_PTR uTitleIcon, LPCWSTR pszTitle, BOOL isW)
 
static LRESULT TOOLTIPS_SetToolInfoT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_TrackActivate (TOOLTIPS_INFO *infoPtr, BOOL track_activate, const TTTOOLINFOA *ti)
 
static LRESULT TOOLTIPS_TrackPosition (TOOLTIPS_INFO *infoPtr, LPARAM coord)
 
static LRESULT TOOLTIPS_Update (TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_UpdateTipTextT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
 
static LRESULT TOOLTIPS_Create (HWND hwnd)
 
static LRESULT TOOLTIPS_Destroy (TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_GetFont (const TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_MouseMessage (TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_NCCreate (HWND hwnd)
 
static LRESULT TOOLTIPS_NCHitTest (const TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 
static LRESULT TOOLTIPS_NotifyFormat (TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 
static LRESULT TOOLTIPS_Paint (const TOOLTIPS_INFO *infoPtr, HDC hDC)
 
static LRESULT TOOLTIPS_SetFont (TOOLTIPS_INFO *infoPtr, HFONT hFont, BOOL redraw)
 
static LRESULT TOOLTIPS_GetTextLength (const TOOLTIPS_INFO *infoPtr)
 
static LRESULT TOOLTIPS_OnWMGetText (const TOOLTIPS_INFO *infoPtr, WPARAM size, LPWSTR pszText)
 
static LRESULT TOOLTIPS_Timer (TOOLTIPS_INFO *infoPtr, INT iTimer)
 
static LRESULT TOOLTIPS_WinIniChange (TOOLTIPS_INFO *infoPtr)
 
static LRESULT CALLBACK TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
VOID TOOLTIPS_Register (void)
 
VOID TOOLTIPS_Unregister (void)
 

Variables

static HICON hTooltipIcons [TTI_ERROR+1]
 

Macro Definition Documentation

◆ BALLOON_ICON_TITLE_SPACING

#define BALLOON_ICON_TITLE_SPACING   8 /* horizontal spacing between icon and title */

Definition at line 177 of file tooltips.c.

◆ BALLOON_ROUNDEDNESS

#define BALLOON_ROUNDEDNESS   20

Definition at line 171 of file tooltips.c.

◆ BALLOON_STEMHEIGHT

#define BALLOON_STEMHEIGHT   13

Definition at line 172 of file tooltips.c.

◆ BALLOON_STEMINDENT

#define BALLOON_STEMINDENT   20

Definition at line 174 of file tooltips.c.

◆ BALLOON_STEMWIDTH

#define BALLOON_STEMWIDTH   10

Definition at line 173 of file tooltips.c.

◆ BALLOON_TEXT_MARGIN

#define BALLOON_TEXT_MARGIN   (NORMAL_TEXT_MARGIN+8)

Definition at line 162 of file tooltips.c.

◆ BALLOON_TITLE_TEXT_SPACING

#define BALLOON_TITLE_TEXT_SPACING   8 /* vertical spacing between icon/title and main text */

Definition at line 178 of file tooltips.c.

◆ ICON_HEIGHT

#define ICON_HEIGHT   16

Definition at line 179 of file tooltips.c.

◆ ICON_WIDTH

#define ICON_WIDTH   16

Definition at line 180 of file tooltips.c.

◆ ID_TIMERLEAVE

#define ID_TIMERLEAVE   3 /* tool leave timer */

Definition at line 155 of file tooltips.c.

◆ ID_TIMERPOP

#define ID_TIMERPOP   2 /* auto pop timer */

Definition at line 154 of file tooltips.c.

◆ ID_TIMERSHOW

#define ID_TIMERSHOW   1 /* show delay timer */

Definition at line 153 of file tooltips.c.

◆ MAX_TEXT_SIZE_A

#define MAX_TEXT_SIZE_A   80 /* maximum retrieving text size by ANSI message */

Definition at line 182 of file tooltips.c.

◆ NORMAL_TEXT_MARGIN

#define NORMAL_TEXT_MARGIN   2

Definition at line 161 of file tooltips.c.

◆ TOOLTIPS_GetInfoPtr

#define TOOLTIPS_GetInfoPtr (   hWindow)    ((TOOLTIPS_INFO *)GetWindowLongPtrW (hWindow, 0))

Definition at line 158 of file tooltips.c.

Function Documentation

◆ TOOLTIPS_Activate()

static LRESULT TOOLTIPS_Activate ( TOOLTIPS_INFO infoPtr,
BOOL  activate 
)
static

Definition at line 1101 of file tooltips.c.

1102{
1103 infoPtr->bActive = activate;
1104
1105 TRACE("activate %d\n", activate);
1106
1107 if (!(infoPtr->bActive) && (infoPtr->nCurrentTool != -1))
1108 TOOLTIPS_Hide (infoPtr);
1109
1110 return 0;
1111}
static void TOOLTIPS_Hide(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:909
#define TRACE(s)
Definition: solgame.cpp:4
BOOL bActive
Definition: tooltips.c:129
INT nCurrentTool
Definition: tooltips.c:140

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_AddToolT()

static LRESULT TOOLTIPS_AddToolT ( TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1115 of file tooltips.c.

1116{
1117 TTTOOL_INFO *toolPtr;
1118 INT nResult;
1119
1120 if (!ti) return FALSE;
1121
1122 TRACE("add tool (%p) %p %ld%s\n", infoPtr->hwndSelf, ti->hwnd, ti->uId,
1123 (ti->uFlags & TTF_IDISHWND) ? " TTF_IDISHWND" : "");
1124
1125 if (ti->cbSize > TTTOOLINFOW_V3_SIZE && isW)
1126 return FALSE;
1127
1128 if (infoPtr->uNumTools == 0) {
1129 infoPtr->tools = Alloc (sizeof(TTTOOL_INFO));
1130 toolPtr = infoPtr->tools;
1131 }
1132 else {
1133 TTTOOL_INFO *oldTools = infoPtr->tools;
1134 infoPtr->tools =
1135 Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools + 1));
1136 memcpy (infoPtr->tools, oldTools,
1137 infoPtr->uNumTools * sizeof(TTTOOL_INFO));
1138 Free (oldTools);
1139 toolPtr = &infoPtr->tools[infoPtr->uNumTools];
1140 }
1141
1142 infoPtr->uNumTools++;
1143
1144 /* copy tool data */
1145 toolPtr->uFlags = ti->uFlags;
1146 toolPtr->uInternalFlags = (ti->uFlags & (TTF_SUBCLASS | TTF_IDISHWND));
1147 toolPtr->hwnd = ti->hwnd;
1148 toolPtr->uId = ti->uId;
1149 toolPtr->rect = ti->rect;
1150 toolPtr->hinst = ti->hinst;
1151
1152 if (ti->cbSize >= TTTOOLINFOW_V1_SIZE) {
1153 if (IS_INTRESOURCE(ti->lpszText)) {
1154 TRACE("add string id %x\n", LOWORD(ti->lpszText));
1155 toolPtr->lpszText = ti->lpszText;
1156 }
1157 else if (ti->lpszText) {
1159 TRACE("add CALLBACK\n");
1160 toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
1161 }
1162 else if (isW) {
1163 INT len = lstrlenW (ti->lpszText);
1164 TRACE("add text %s\n", debugstr_w(ti->lpszText));
1165 toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR));
1166 strcpyW (toolPtr->lpszText, ti->lpszText);
1167 }
1168 else {
1169 INT len = MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, NULL, 0);
1170 TRACE("add text \"%s\"\n", debugstr_a((char *)ti->lpszText));
1171 toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
1172 MultiByteToWideChar(CP_ACP, 0, (LPSTR)ti->lpszText, -1, toolPtr->lpszText, len);
1173 }
1174 }
1175 }
1176
1177 if (ti->cbSize >= TTTOOLINFOW_V2_SIZE)
1178 toolPtr->lParam = ti->lParam;
1179
1180 /* install subclassing hook */
1181 if (toolPtr->uInternalFlags & TTF_SUBCLASS) {
1182 if (toolPtr->uInternalFlags & TTF_IDISHWND) {
1184 (DWORD_PTR)infoPtr->hwndSelf);
1185 }
1186 else {
1188 (DWORD_PTR)infoPtr->hwndSelf);
1189 }
1190 TRACE("subclassing installed\n");
1191 }
1192
1193 nResult = SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
1194 (WPARAM)infoPtr->hwndSelf, NF_QUERY);
1195 if (nResult == NFR_ANSI) {
1196 toolPtr->bNotifyUnicode = FALSE;
1197 TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
1198 } else if (nResult == NFR_UNICODE) {
1199 toolPtr->bNotifyUnicode = TRUE;
1200 TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
1201 } else {
1202 TRACE (" -- WM_NOTIFYFORMAT returns: %d\n", nResult);
1203 }
1204
1205 return TRUE;
1206}
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1261
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static BOOL TOOLTIPS_IsCallbackString(LPCWSTR str, BOOL isW)
Definition: tooltips.c:188
static LRESULT CALLBACK TOOLTIPS_SubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uId, DWORD_PTR dwRef)
Definition: tooltips.c:2204
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrlenW
Definition: compat.h:750
GLenum GLsizei len
Definition: glext.h:6722
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define LOWORD(l)
Definition: pedump.c:82
#define LPSTR_TEXTCALLBACKW
Definition: commctrl.h:2380
#define TTTOOLINFOW_V1_SIZE
Definition: commctrl.h:1721
#define TTTOOLINFOW_V3_SIZE
Definition: commctrl.h:1725
#define TTF_IDISHWND
Definition: commctrl.h:1764
#define TTF_SUBCLASS
Definition: commctrl.h:1767
#define TTTOOLINFOW_V2_SIZE
Definition: commctrl.h:1723
#define strcpyW(d, s)
Definition: unicode.h:29
UINT uNumTools
Definition: tooltips.c:131
HWND hwndSelf
Definition: tooltips.c:127
TTTOOL_INFO * tools
Definition: tooltips.c:150
UINT_PTR uId
Definition: tooltips.c:117
UINT uFlags
Definition: tooltips.c:113
UINT uInternalFlags
Definition: tooltips.c:114
BOOL bNotifyUnicode
Definition: tooltips.c:116
HINSTANCE hinst
Definition: tooltips.c:119
RECT rect
Definition: tooltips.c:118
LPARAM lParam
Definition: tooltips.c:121
LPWSTR lpszText
Definition: tooltips.c:120
HWND hwnd
Definition: tooltips.c:115
HINSTANCE hinst
Definition: commctrl.h:1745
UINT_PTR uId
Definition: commctrl.h:1743
LPARAM lParam
Definition: commctrl.h:1747
LPWSTR lpszText
Definition: commctrl.h:1746
uint32_t DWORD_PTR
Definition: typedefs.h:65
int32_t INT
Definition: typedefs.h:58
static const WCHAR isW[]
Definition: lex.c:62
UINT_PTR WPARAM
Definition: windef.h:207
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define NFR_ANSI
Definition: winuser.h:2458
#define NFR_UNICODE
Definition: winuser.h:2459
#define NF_QUERY
Definition: winuser.h:2460
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_CalcTipSize()

static void TOOLTIPS_CalcTipSize ( const TOOLTIPS_INFO infoPtr,
LPSIZE  lpSize 
)
static

Definition at line 537 of file tooltips.c.

538{
539 HDC hdc;
540 HFONT hOldFont;
543 RECT rc = {0, 0, 0, 0};
544 SIZE title = {0, 0};
545
546 if (infoPtr->nMaxTipWidth > -1) {
547 rc.right = infoPtr->nMaxTipWidth;
549 }
550 if (style & TTS_NOPREFIX)
552 TRACE("%s\n", debugstr_w(infoPtr->szTipText));
553
554 hdc = GetDC (infoPtr->hwndSelf);
555 if (infoPtr->pszTitle)
556 {
557 RECT rcTitle = {0, 0, 0, 0};
558 TRACE("title %s\n", debugstr_w(infoPtr->pszTitle));
559 if (infoPtr->hTitleIcon)
560 {
561 title.cx = ICON_WIDTH;
562 title.cy = ICON_HEIGHT;
563 }
564 if (title.cx != 0) title.cx += BALLOON_ICON_TITLE_SPACING;
565 hOldFont = SelectObject (hdc, infoPtr->hTitleFont);
566 DrawTextW(hdc, infoPtr->pszTitle, -1, &rcTitle, DT_SINGLELINE | DT_NOPREFIX | DT_CALCRECT);
567 SelectObject (hdc, hOldFont);
568 title.cy = max(title.cy, rcTitle.bottom - rcTitle.top) + BALLOON_TITLE_TEXT_SPACING;
569 title.cx += (rcTitle.right - rcTitle.left);
570 }
571 hOldFont = SelectObject (hdc, infoPtr->hFont);
572#ifdef __REACTOS__
574#endif
575 DrawTextW (hdc, infoPtr->szTipText, -1, &rc, uFlags);
576 SelectObject (hdc, hOldFont);
577 ReleaseDC (infoPtr->hwndSelf, hdc);
578
579 if ((style & TTS_BALLOON) || infoPtr->pszTitle)
580 {
581 lpSize->cx = max(rc.right - rc.left, title.cx) + 2*BALLOON_TEXT_MARGIN +
582 infoPtr->rcMargin.left + infoPtr->rcMargin.right;
583 lpSize->cy = title.cy + rc.bottom - rc.top + 2*BALLOON_TEXT_MARGIN +
584 infoPtr->rcMargin.bottom + infoPtr->rcMargin.top +
586 }
587 else
588 {
589 lpSize->cx = rc.right - rc.left + 2*NORMAL_TEXT_MARGIN +
590 infoPtr->rcMargin.left + infoPtr->rcMargin.right;
591 lpSize->cy = rc.bottom - rc.top + 2*NORMAL_TEXT_MARGIN +
592 infoPtr->rcMargin.bottom + infoPtr->rcMargin.top;
593 }
594}
Arabic default style
Definition: afstyles.h:94
UINT uFlags
Definition: api.c:59
#define BALLOON_TEXT_MARGIN
Definition: tooltips.c:162
#define BALLOON_STEMHEIGHT
Definition: tooltips.c:172
#define ICON_WIDTH
Definition: tooltips.c:180
#define NORMAL_TEXT_MARGIN
Definition: tooltips.c:161
#define ICON_HEIGHT
Definition: tooltips.c:179
#define BALLOON_TITLE_TEXT_SPACING
Definition: tooltips.c:178
#define BALLOON_ICON_TITLE_SPACING
Definition: tooltips.c:177
unsigned long DWORD
Definition: ntddk_ex.h:95
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:92
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
unsigned int UINT
Definition: ndis.h:50
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:16
static char title[]
Definition: ps.c:92
#define TTS_NOPREFIX
Definition: commctrl.h:1758
#define TTS_BALLOON
Definition: commctrl.h:1761
INT nMaxTipWidth
Definition: tooltips.c:138
HICON hTitleIcon
Definition: tooltips.c:148
HFONT hFont
Definition: tooltips.c:134
RECT rcMargin
Definition: tooltips.c:145
LPWSTR pszTitle
Definition: tooltips.c:147
HFONT hTitleFont
Definition: tooltips.c:135
WCHAR szTipText[INFOTIPSIZE]
Definition: tooltips.c:128
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG cx
Definition: windef.h:334
LONG cy
Definition: windef.h:335
#define max(a, b)
Definition: svc.c:63
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define DT_NOPREFIX
Definition: winuser.h:537
#define DT_EXTERNALLEADING
Definition: winuser.h:533
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define DT_SINGLELINE
Definition: winuser.h:540
#define DT_WORDBREAK
Definition: winuser.h:544
HDC WINAPI GetDC(_In_opt_ HWND)
#define DT_EXPANDTABS
Definition: winuser.h:532
#define DT_CALCRECT
Definition: winuser.h:526
#define GWL_STYLE
Definition: winuser.h:852

Referenced by TOOLTIPS_GetBubbleSize(), and TOOLTIPS_Show().

◆ TOOLTIPS_CheckTool()

static INT TOOLTIPS_CheckTool ( const TOOLTIPS_INFO infoPtr,
BOOL  bShowTest 
)
static

Definition at line 1065 of file tooltips.c.

1066{
1067 POINT pt;
1068 HWND hwndTool;
1069 INT nTool;
1070
1071 GetCursorPos (&pt);
1072 hwndTool = (HWND)SendMessageW (infoPtr->hwndSelf, TTM_WINDOWFROMPOINT, 0, (LPARAM)&pt);
1073 if (hwndTool == 0)
1074 return -1;
1075
1076 ScreenToClient (hwndTool, &pt);
1077 nTool = TOOLTIPS_GetToolFromPoint (infoPtr, hwndTool, &pt);
1078 if (nTool == -1)
1079 return -1;
1080
1081 if (!(GetWindowLongW (infoPtr->hwndSelf, GWL_STYLE) & TTS_ALWAYSTIP) && bShowTest)
1082 {
1083 TTTOOL_INFO *ti = &infoPtr->tools[nTool];
1084 HWND hwnd = (ti->uFlags & TTF_IDISHWND) ? (HWND)ti->uId : ti->hwnd;
1085
1087 {
1088 TRACE("not active: hwnd %p, parent %p, active %p\n",
1090 return -1;
1091 }
1092 }
1093
1094 TRACE("tool %d\n", nTool);
1095
1096 return nTool;
1097}
static INT TOOLTIPS_GetToolFromPoint(const TOOLTIPS_INFO *infoPtr, HWND hwnd, const POINT *lpPt)
Definition: tooltips.c:993
static BOOL TOOLTIPS_IsWindowActive(HWND hwnd)
Definition: tooltips.c:1053
HANDLE HWND
Definition: compat.h:19
#define pt(x, y)
Definition: drawing.c:79
#define TTS_ALWAYSTIP
Definition: commctrl.h:1757
#define TTM_WINDOWFROMPOINT
Definition: commctrl.h:1811
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
HWND WINAPI GetActiveWindow(void)
Definition: winpos.c:138
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:2670
HWND WINAPI GetParent(_In_ HWND)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

Referenced by TOOLTIPS_Timer().

◆ TOOLTIPS_CopyInfoT()

static void TOOLTIPS_CopyInfoT ( const TOOLTIPS_INFO infoPtr,
INT  index,
TTTOOLINFOW ti,
BOOL  isW 
)
inlinestatic

Definition at line 1023 of file tooltips.c.

1024{
1025 const TTTOOL_INFO *toolPtr = &infoPtr->tools[index];
1026
1027 ti->uFlags = toolPtr->uFlags;
1028 ti->hwnd = toolPtr->hwnd;
1029 ti->uId = toolPtr->uId;
1030 ti->rect = toolPtr->rect;
1031 ti->hinst = toolPtr->hinst;
1032
1033 if (ti->lpszText) {
1034 if (toolPtr->lpszText == NULL ||
1035 IS_INTRESOURCE(toolPtr->lpszText) ||
1036 toolPtr->lpszText == LPSTR_TEXTCALLBACKW)
1037 ti->lpszText = toolPtr->lpszText;
1038 else if (isW)
1039 strcpyW (ti->lpszText, toolPtr->lpszText);
1040 else
1041 /* ANSI version, the buffer is maximum 80 bytes without null. */
1042 WideCharToMultiByte(CP_ACP, 0, toolPtr->lpszText, -1,
1044 }
1045
1046 if (ti->cbSize >= TTTOOLINFOW_V2_SIZE)
1047 ti->lParam = toolPtr->lParam;
1048
1049 /* lpReserved is intentionally not set. */
1050}
#define index(s, c)
Definition: various.h:29
#define MAX_TEXT_SIZE_A
Definition: tooltips.c:182
#define WideCharToMultiByte
Definition: compat.h:111

Referenced by TOOLTIPS_EnumToolsT(), TOOLTIPS_GetCurrentToolT(), TOOLTIPS_GetToolInfoT(), and TOOLTIPS_HitTestT().

◆ TOOLTIPS_Create()

static LRESULT TOOLTIPS_Create ( HWND  hwnd)
static

Definition at line 1905 of file tooltips.c.

1906{
1907 TOOLTIPS_INFO *infoPtr;
1908
1909 /* allocate memory for info structure */
1910 infoPtr = Alloc (sizeof(TOOLTIPS_INFO));
1911 SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
1912
1913 /* initialize info structure */
1914 infoPtr->bActive = TRUE;
1915 infoPtr->bTrackActive = FALSE;
1916
1917 infoPtr->nMaxTipWidth = -1;
1918 infoPtr->nTool = -1;
1919 infoPtr->nCurrentTool = -1;
1920 infoPtr->nTrackTool = -1;
1921 infoPtr->hwndSelf = hwnd;
1922
1923 /* initialize colours and fonts */
1925
1927
1929
1930 return 0;
1931}
static LRESULT TOOLTIPS_SetDelayTime(TOOLTIPS_INFO *infoPtr, DWORD duration, INT nTime)
Definition: tooltips.c:1591
static void TOOLTIPS_InitSystemSettings(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:207
#define TTDT_AUTOMATIC
Definition: commctrl.h:1774
INT nTrackTool
Definition: tooltips.c:141
BOOL bTrackActive
Definition: tooltips.c:130
#define SWP_NOACTIVATE
Definition: winuser.h:1242
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define HWND_TOP
Definition: winuser.h:1207
#define SWP_HIDEWINDOW
Definition: winuser.h:1241
#define SWP_NOZORDER
Definition: winuser.h:1247
#define SetWindowLongPtrW
Definition: winuser.h:5346

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_customdraw_fill()

static void TOOLTIPS_customdraw_fill ( const TOOLTIPS_INFO infoPtr,
NMTTCUSTOMDRAW lpnmttcd,
HDC  hdc,
const RECT rcBounds,
UINT  uFlags 
)
static

Definition at line 226 of file tooltips.c.

228{
229 ZeroMemory(lpnmttcd, sizeof(NMTTCUSTOMDRAW));
230 lpnmttcd->uDrawFlags = uFlags;
231 lpnmttcd->nmcd.hdr.hwndFrom = infoPtr->hwndSelf;
232 lpnmttcd->nmcd.hdr.code = NM_CUSTOMDRAW;
233 if (infoPtr->nCurrentTool != -1) {
234 TTTOOL_INFO *toolPtr = &infoPtr->tools[infoPtr->nCurrentTool];
235 lpnmttcd->nmcd.hdr.idFrom = toolPtr->uId;
236 }
237 lpnmttcd->nmcd.hdc = hdc;
238 lpnmttcd->nmcd.rc = *rcBounds;
239 /* FIXME - dwItemSpec, uItemState, lItemlParam */
240}
#define NM_CUSTOMDRAW
Definition: commctrl.h:137
UINT_PTR idFrom
Definition: winuser.h:3158
UINT code
Definition: winuser.h:3159
HWND hwndFrom
Definition: winuser.h:3157
NMCUSTOMDRAW nmcd
Definition: commctrl.h:313
#define ZeroMemory
Definition: winbase.h:1712

Referenced by TOOLTIPS_Refresh().

◆ TOOLTIPS_DelToolT()

static LRESULT TOOLTIPS_DelToolT ( TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1217 of file tooltips.c.

1218{
1219 TTTOOL_INFO *toolPtr;
1220 INT nTool;
1221
1222 if (!ti) return 0;
1223 if (isW && ti->cbSize > TTTOOLINFOW_V2_SIZE &&
1225 return 0;
1226 if (infoPtr->uNumTools == 0)
1227 return 0;
1228
1229 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, ti);
1230
1231 TRACE("tool %d\n", nTool);
1232
1233 if (nTool == -1)
1234 return 0;
1235
1236 /* make sure the tooltip has disappeared before deleting it */
1237 TOOLTIPS_Hide(infoPtr);
1238
1239 /* delete text string */
1240 toolPtr = &infoPtr->tools[nTool];
1241 if (toolPtr->lpszText) {
1242 if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
1243 !IS_INTRESOURCE(toolPtr->lpszText) )
1244 Free (toolPtr->lpszText);
1245 }
1246
1247 TOOLTIPS_ResetSubclass (toolPtr);
1248
1249 /* delete tool from tool list */
1250 if (infoPtr->uNumTools == 1) {
1251 Free (infoPtr->tools);
1252 infoPtr->tools = NULL;
1253 }
1254 else {
1255 TTTOOL_INFO *oldTools = infoPtr->tools;
1256 infoPtr->tools =
1257 Alloc (sizeof(TTTOOL_INFO) * (infoPtr->uNumTools - 1));
1258
1259 if (nTool > 0)
1260 memcpy (&infoPtr->tools[0], &oldTools[0],
1261 nTool * sizeof(TTTOOL_INFO));
1262
1263 if (nTool < infoPtr->uNumTools - 1)
1264 memcpy (&infoPtr->tools[nTool], &oldTools[nTool + 1],
1265 (infoPtr->uNumTools - nTool - 1) * sizeof(TTTOOL_INFO));
1266
1267 Free (oldTools);
1268 }
1269
1270 /* update any indices affected by delete */
1271
1272 /* destroying tool that mouse was on on last relayed mouse move */
1273 if (infoPtr->nTool == nTool)
1274 /* -1 means no current tool (0 means first tool) */
1275 infoPtr->nTool = -1;
1276 else if (infoPtr->nTool > nTool)
1277 infoPtr->nTool--;
1278
1279 if (infoPtr->nTrackTool == nTool)
1280 /* -1 means no current tool (0 means first tool) */
1281 infoPtr->nTrackTool = -1;
1282 else if (infoPtr->nTrackTool > nTool)
1283 infoPtr->nTrackTool--;
1284
1285 if (infoPtr->nCurrentTool == nTool)
1286 /* -1 means no current tool (0 means first tool) */
1287 infoPtr->nCurrentTool = -1;
1288 else if (infoPtr->nCurrentTool > nTool)
1289 infoPtr->nCurrentTool--;
1290
1291 infoPtr->uNumTools--;
1292
1293 return 0;
1294}
static void TOOLTIPS_ResetSubclass(const TTTOOL_INFO *toolPtr)
Definition: tooltips.c:1208
static INT TOOLTIPS_GetToolFromInfoT(const TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo)
Definition: tooltips.c:966

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_Destroy()

static LRESULT TOOLTIPS_Destroy ( TOOLTIPS_INFO infoPtr)
static

Definition at line 1935 of file tooltips.c.

1936{
1937 TTTOOL_INFO *toolPtr;
1938 UINT i;
1939
1940 /* free tools */
1941 if (infoPtr->tools) {
1942 for (i = 0; i < infoPtr->uNumTools; i++) {
1943 toolPtr = &infoPtr->tools[i];
1944 if (toolPtr->lpszText) {
1945 if ( (toolPtr->lpszText != LPSTR_TEXTCALLBACKW) &&
1946 !IS_INTRESOURCE(toolPtr->lpszText) )
1947 {
1948 Free (toolPtr->lpszText);
1949 toolPtr->lpszText = NULL;
1950 }
1951 }
1952
1953 TOOLTIPS_ResetSubclass (toolPtr);
1954 }
1955
1956 Free (infoPtr->tools);
1957 }
1958
1959 /* free title string */
1960 Free (infoPtr->pszTitle);
1961 /* free title icon if not a standard one */
1963 DeleteObject(infoPtr->hTitleIcon);
1964
1965 /* delete fonts */
1966 DeleteObject (infoPtr->hFont);
1967 DeleteObject (infoPtr->hTitleFont);
1968
1969 /* free tool tips info data */
1970 SetWindowLongPtrW(infoPtr->hwndSelf, 0, 0);
1971 Free (infoPtr);
1972
1973 return 0;
1974}
static UINT_PTR TOOLTIPS_GetTitleIconIndex(HICON hIcon)
Definition: tooltips.c:197
pKey DeleteObject()
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TTI_ERROR
Definition: commctrl.h:1782

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_EnumToolsT()

static LRESULT TOOLTIPS_EnumToolsT ( const TOOLTIPS_INFO infoPtr,
UINT  uIndex,
TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1297 of file tooltips.c.

1299{
1300 if (!ti || ti->cbSize < TTTOOLINFOW_V1_SIZE)
1301 return FALSE;
1302 if (uIndex >= infoPtr->uNumTools)
1303 return FALSE;
1304
1305 TRACE("index=%u\n", uIndex);
1306
1307 TOOLTIPS_CopyInfoT (infoPtr, uIndex, ti, isW);
1308
1309 return TRUE;
1310}
static void TOOLTIPS_CopyInfoT(const TOOLTIPS_INFO *infoPtr, INT index, TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1023

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetBubbleSize()

static LRESULT TOOLTIPS_GetBubbleSize ( const TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW lpToolInfo 
)
static

Definition at line 1313 of file tooltips.c.

1314{
1315 INT nTool;
1316 SIZE size;
1317
1318 if (lpToolInfo == NULL)
1319 return FALSE;
1320 if (lpToolInfo->cbSize < TTTOOLINFOW_V1_SIZE)
1321 return FALSE;
1322
1323 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, lpToolInfo);
1324 if (nTool == -1) return 0;
1325
1326 TRACE("tool %d\n", nTool);
1327
1328 TOOLTIPS_CalcTipSize (infoPtr, &size);
1329 TRACE("size %d x %d\n", size.cx, size.cy);
1330
1331 return MAKELRESULT(size.cx, size.cy);
1332}
static void TOOLTIPS_CalcTipSize(const TOOLTIPS_INFO *infoPtr, LPSIZE lpSize)
Definition: tooltips.c:537
GLsizeiptr size
Definition: glext.h:5919
#define MAKELRESULT(l, h)
Definition: winuser.h:4010

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetCurrentToolT()

static LRESULT TOOLTIPS_GetCurrentToolT ( const TOOLTIPS_INFO infoPtr,
TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1335 of file tooltips.c.

1336{
1337 if (ti) {
1338 if (ti->cbSize < TTTOOLINFOW_V1_SIZE)
1339 return FALSE;
1340
1341 if (infoPtr->nCurrentTool != -1)
1342 TOOLTIPS_CopyInfoT (infoPtr, infoPtr->nCurrentTool, ti, isW);
1343 }
1344
1345 return infoPtr->nCurrentTool != -1;
1346}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetDelayTime()

static LRESULT TOOLTIPS_GetDelayTime ( const TOOLTIPS_INFO infoPtr,
DWORD  duration 
)
static

Definition at line 1350 of file tooltips.c.

1351{
1352 switch (duration) {
1353 case TTDT_RESHOW:
1354 return infoPtr->nReshowTime;
1355
1356 case TTDT_AUTOPOP:
1357 return infoPtr->nAutoPopTime;
1358
1359 case TTDT_INITIAL:
1360 case TTDT_AUTOMATIC: /* Apparently TTDT_AUTOMATIC returns TTDT_INITIAL */
1361 return infoPtr->nInitialTime;
1362
1363 default:
1364 WARN("Invalid duration flag %x\n", duration);
1365 break;
1366 }
1367
1368 return -1;
1369}
#define WARN(fmt,...)
Definition: debug.h:112
#define TTDT_RESHOW
Definition: commctrl.h:1775
#define TTDT_AUTOPOP
Definition: commctrl.h:1776
#define TTDT_INITIAL
Definition: commctrl.h:1777
INT nReshowTime
Definition: tooltips.c:142
INT nAutoPopTime
Definition: tooltips.c:143
INT nInitialTime
Definition: tooltips.c:144

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetDispInfoA()

static void TOOLTIPS_GetDispInfoA ( const TOOLTIPS_INFO infoPtr,
TTTOOL_INFO toolPtr,
WCHAR buffer 
)
static

Definition at line 380 of file tooltips.c.

381{
382 NMTTDISPINFOA ttnmdi;
383
384 /* fill NMHDR struct */
385 ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOA));
386 ttnmdi.hdr.hwndFrom = infoPtr->hwndSelf;
387 ttnmdi.hdr.idFrom = toolPtr->uId;
388 ttnmdi.hdr.code = TTN_GETDISPINFOA; /* == TTN_NEEDTEXTA */
389 ttnmdi.lpszText = ttnmdi.szText;
390 ttnmdi.uFlags = toolPtr->uFlags;
391 ttnmdi.lParam = toolPtr->lParam;
392
393 TRACE("hdr.idFrom = %lx\n", ttnmdi.hdr.idFrom);
394 SendMessageW(toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&ttnmdi);
395
396 if (IS_INTRESOURCE(ttnmdi.lpszText)) {
397 LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
399 if (ttnmdi.uFlags & TTF_DI_SETITEM) {
400 toolPtr->hinst = ttnmdi.hinst;
401 toolPtr->lpszText = (LPWSTR)ttnmdi.lpszText;
402 }
403 }
404 else if (ttnmdi.lpszText == 0) {
405 buffer[0] = '\0';
406 }
407 else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
409 if (ttnmdi.uFlags & TTF_DI_SETITEM) {
410 toolPtr->hinst = 0;
411 toolPtr->lpszText = NULL;
412 Str_SetPtrW(&toolPtr->lpszText, buffer);
413 }
414 }
415 else {
416 ERR("recursive text callback\n");
417 buffer[0] = '\0';
418 }
419
420#ifndef __REACTOS_
421 /* no text available - try calling parent instead as per native */
422 /* FIXME: Unsure if SETITEM should save the value or not */
423 if (buffer[0] == 0x00) {
424
425 SendMessageW(GetParent(toolPtr->hwnd), WM_NOTIFY, toolPtr->uId, (LPARAM)&ttnmdi);
426
427 if (IS_INTRESOURCE(ttnmdi.lpszText)) {
428 LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
430 } else if (ttnmdi.lpszText &&
431 ttnmdi.lpszText != LPSTR_TEXTCALLBACKA) {
433 }
434 }
435#endif
436}
#define ERR(fmt,...)
Definition: debug.h:110
INT Str_GetPtrAtoW(LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN
BOOL WINAPI Str_SetPtrW(LPWSTR *lppDest, LPCWSTR lpSrc)
Definition: string.c:236
GLuint buffer
Definition: glext.h:5915
#define TTN_GETDISPINFOA
Definition: commctrl.h:1872
#define LPSTR_TEXTCALLBACKA
Definition: commctrl.h:2381
#define TTF_DI_SETITEM
Definition: commctrl.h:1772
#define INFOTIPSIZE
Definition: commctrl.h:124
#define WM_NOTIFY
Definition: richedit.h:61
char szText[80]
Definition: commctrl.h:1898
HINSTANCE hinst
Definition: commctrl.h:1899
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by TOOLTIPS_GetTipText().

◆ TOOLTIPS_GetDispInfoW()

static void TOOLTIPS_GetDispInfoW ( const TOOLTIPS_INFO infoPtr,
TTTOOL_INFO toolPtr,
WCHAR buffer 
)
static

Definition at line 438 of file tooltips.c.

439{
440 NMTTDISPINFOW ttnmdi;
441
442 /* fill NMHDR struct */
443 ZeroMemory (&ttnmdi, sizeof(NMTTDISPINFOW));
444 ttnmdi.hdr.hwndFrom = infoPtr->hwndSelf;
445 ttnmdi.hdr.idFrom = toolPtr->uId;
446 ttnmdi.hdr.code = TTN_GETDISPINFOW; /* == TTN_NEEDTEXTW */
447 ttnmdi.lpszText = ttnmdi.szText;
448 ttnmdi.uFlags = toolPtr->uFlags;
449 ttnmdi.lParam = toolPtr->lParam;
450
451 TRACE("hdr.idFrom = %lx\n", ttnmdi.hdr.idFrom);
452 SendMessageW(toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&ttnmdi);
453
454 if (IS_INTRESOURCE(ttnmdi.lpszText)) {
455 LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
457 if (ttnmdi.uFlags & TTF_DI_SETITEM) {
458 toolPtr->hinst = ttnmdi.hinst;
459 toolPtr->lpszText = ttnmdi.lpszText;
460 }
461 }
462 else if (ttnmdi.lpszText == 0) {
463 buffer[0] = '\0';
464 }
465 else if (ttnmdi.lpszText != LPSTR_TEXTCALLBACKW) {
467 if (ttnmdi.uFlags & TTF_DI_SETITEM) {
468 toolPtr->hinst = 0;
469 toolPtr->lpszText = NULL;
470 Str_SetPtrW(&toolPtr->lpszText, buffer);
471 }
472 }
473 else {
474 ERR("recursive text callback\n");
475 buffer[0] = '\0';
476 }
477
478#ifndef __REACTOS__
479 /* no text available - try calling parent instead as per native */
480 /* FIXME: Unsure if SETITEM should save the value or not */
481 if (buffer[0] == 0x00) {
482
483 SendMessageW(GetParent(toolPtr->hwnd), WM_NOTIFY, toolPtr->uId, (LPARAM)&ttnmdi);
484
485 if (IS_INTRESOURCE(ttnmdi.lpszText)) {
486 LoadStringW(ttnmdi.hinst, LOWORD(ttnmdi.lpszText),
488 } else if (ttnmdi.lpszText &&
489 ttnmdi.lpszText != LPSTR_TEXTCALLBACKW) {
491 }
492 }
493#endif
494
495}
INT WINAPI Str_GetPtrW(LPCWSTR, LPWSTR, INT)
Definition: string.c:204
#define TTN_GETDISPINFOW
Definition: commctrl.h:1873
HINSTANCE hinst
Definition: commctrl.h:1908
WCHAR szText[80]
Definition: commctrl.h:1907

Referenced by TOOLTIPS_GetTipText().

◆ TOOLTIPS_GetFont()

static LRESULT TOOLTIPS_GetFont ( const TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 1978 of file tooltips.c.

1979{
1980 return (LRESULT)infoPtr->hFont;
1981}
LONG_PTR LRESULT
Definition: windef.h:209

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetMargin()

static LRESULT TOOLTIPS_GetMargin ( const TOOLTIPS_INFO infoPtr,
RECT rect 
)
static

Definition at line 1373 of file tooltips.c.

1374{
1375 if (rect)
1376 *rect = infoPtr->rcMargin;
1377
1378 return 0;
1379}
& rect
Definition: startmenu.cpp:1413

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetMaxTipWidth()

static LRESULT TOOLTIPS_GetMaxTipWidth ( const TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 1383 of file tooltips.c.

1384{
1385 return infoPtr->nMaxTipWidth;
1386}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetTextLength()

static LRESULT TOOLTIPS_GetTextLength ( const TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 2115 of file tooltips.c.

2116{
2117 return strlenW(infoPtr->szTipText);
2118}
#define strlenW(s)
Definition: unicode.h:28

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetTextT()

static LRESULT TOOLTIPS_GetTextT ( const TOOLTIPS_INFO infoPtr,
TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1390 of file tooltips.c.

1391{
1392 INT nTool;
1393
1394 if (!ti) return 0;
1395 if (ti->cbSize < TTTOOLINFOW_V1_SIZE)
1396 return 0;
1397
1398 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, ti);
1399 if (nTool == -1) return 0;
1400
1401 if (infoPtr->tools[nTool].lpszText == NULL)
1402 return 0;
1403
1404 if (isW) {
1405 ti->lpszText[0] = '\0';
1406 TOOLTIPS_GetTipText(infoPtr, nTool, ti->lpszText);
1407 }
1408 else {
1410
1411 /* NB this API is broken, there is no way for the app to determine
1412 what size buffer it requires nor a way to specify how long the
1413 one it supplies is. According to the test result, it's up to
1414 80 bytes by the ANSI version. */
1415
1416 buffer[0] = '\0';
1417 TOOLTIPS_GetTipText(infoPtr, nTool, buffer);
1420 }
1421
1422 return 0;
1423}
static void TOOLTIPS_GetTipText(const TOOLTIPS_INFO *infoPtr, INT nTool, WCHAR *buffer)
Definition: tooltips.c:498

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetTipBkColor()

static LRESULT TOOLTIPS_GetTipBkColor ( const TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 1427 of file tooltips.c.

1428{
1429 return infoPtr->clrBk;
1430}
COLORREF clrBk
Definition: tooltips.c:132

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetTipText()

static void TOOLTIPS_GetTipText ( const TOOLTIPS_INFO infoPtr,
INT  nTool,
WCHAR buffer 
)
static

Definition at line 498 of file tooltips.c.

499{
500 TTTOOL_INFO *toolPtr = &infoPtr->tools[nTool];
501
502 if (IS_INTRESOURCE(toolPtr->lpszText)) {
503 /* load a resource */
504 TRACE("load res string %p %x\n",
505 toolPtr->hinst, LOWORD(toolPtr->lpszText));
506 if (!LoadStringW (toolPtr->hinst, LOWORD(toolPtr->lpszText), buffer, INFOTIPSIZE))
507 buffer[0] = '\0';
508 }
509 else if (toolPtr->lpszText) {
510 if (toolPtr->lpszText == LPSTR_TEXTCALLBACKW) {
511 if (toolPtr->bNotifyUnicode)
512 TOOLTIPS_GetDispInfoW(infoPtr, toolPtr, buffer);
513 else
514 TOOLTIPS_GetDispInfoA(infoPtr, toolPtr, buffer);
515 }
516 else {
517 /* the item is a usual (unicode) text */
519 }
520 }
521 else {
522 /* no text available */
523 buffer[0] = '\0';
524 }
525
526 if (!(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & TTS_NOPREFIX)) {
527 WCHAR *ptrW;
528 if ((ptrW = strchrW(buffer, '\t')))
529 *ptrW = 0;
530 }
531
532 TRACE("%s\n", debugstr_w(buffer));
533}
static void TOOLTIPS_GetDispInfoW(const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr, WCHAR *buffer)
Definition: tooltips.c:438
static void TOOLTIPS_GetDispInfoA(const TOOLTIPS_INFO *infoPtr, TTTOOL_INFO *toolPtr, WCHAR *buffer)
Definition: tooltips.c:380
#define lstrcpynW
Definition: compat.h:738
#define strchrW(s, c)
Definition: unicode.h:34

Referenced by TOOLTIPS_GetTextT(), TOOLTIPS_SetToolInfoT(), and TOOLTIPS_Show().

◆ TOOLTIPS_GetTipTextColor()

static LRESULT TOOLTIPS_GetTipTextColor ( const TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 1434 of file tooltips.c.

1435{
1436 return infoPtr->clrText;
1437}
COLORREF clrText
Definition: tooltips.c:133

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetTitleIconIndex()

static UINT_PTR TOOLTIPS_GetTitleIconIndex ( HICON  hIcon)
inlinestatic

Definition at line 197 of file tooltips.c.

198{
199 UINT i;
200 for (i = 0; i <= TTI_ERROR; i++)
201 if (hTooltipIcons[i] == hIcon)
202 return i;
203 return (UINT_PTR)hIcon;
204}
static HICON hTooltipIcons[TTI_ERROR+1]
Definition: tooltips.c:109
HICON hIcon
Definition: msconfig.c:44
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274

Referenced by TOOLTIPS_Destroy().

◆ TOOLTIPS_GetToolCount()

static LRESULT TOOLTIPS_GetToolCount ( const TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 1441 of file tooltips.c.

1442{
1443 return infoPtr->uNumTools;
1444}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_GetToolFromInfoT()

static INT TOOLTIPS_GetToolFromInfoT ( const TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW lpToolInfo 
)
static

Definition at line 966 of file tooltips.c.

967{
968 TTTOOL_INFO *toolPtr;
969 UINT nTool;
970
971 for (nTool = 0; nTool < infoPtr->uNumTools; nTool++) {
972 toolPtr = &infoPtr->tools[nTool];
973
974 if (!(toolPtr->uFlags & TTF_IDISHWND) &&
975 (lpToolInfo->hwnd == toolPtr->hwnd) &&
976 (lpToolInfo->uId == toolPtr->uId))
977 return nTool;
978 }
979
980 for (nTool = 0; nTool < infoPtr->uNumTools; nTool++) {
981 toolPtr = &infoPtr->tools[nTool];
982
983 if ((toolPtr->uFlags & TTF_IDISHWND) &&
984 (lpToolInfo->uId == toolPtr->uId))
985 return nTool;
986 }
987
988 return -1;
989}

Referenced by TOOLTIPS_DelToolT(), TOOLTIPS_GetBubbleSize(), TOOLTIPS_GetTextT(), TOOLTIPS_GetToolInfoT(), TOOLTIPS_NewToolRectT(), TOOLTIPS_SetToolInfoT(), TOOLTIPS_TrackActivate(), and TOOLTIPS_UpdateTipTextT().

◆ TOOLTIPS_GetToolFromPoint()

static INT TOOLTIPS_GetToolFromPoint ( const TOOLTIPS_INFO infoPtr,
HWND  hwnd,
const POINT lpPt 
)
static

Definition at line 993 of file tooltips.c.

994{
995 TTTOOL_INFO *toolPtr;
996 UINT nTool;
997
998 for (nTool = 0; nTool < infoPtr->uNumTools; nTool++) {
999 toolPtr = &infoPtr->tools[nTool];
1000
1001 if (!(toolPtr->uFlags & TTF_IDISHWND)) {
1002 if (hwnd != toolPtr->hwnd)
1003 continue;
1004 if (!PtInRect (&toolPtr->rect, *lpPt))
1005 continue;
1006 return nTool;
1007 }
1008 }
1009
1010 for (nTool = 0; nTool < infoPtr->uNumTools; nTool++) {
1011 toolPtr = &infoPtr->tools[nTool];
1012
1013 if (toolPtr->uFlags & TTF_IDISHWND) {
1014 if ((HWND)toolPtr->uId == hwnd)
1015 return nTool;
1016 }
1017 }
1018
1019 return -1;
1020}
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)

Referenced by TOOLTIPS_CheckTool(), TOOLTIPS_HitTestT(), and TOOLTIPS_RelayEvent().

◆ TOOLTIPS_GetToolInfoT()

static LRESULT TOOLTIPS_GetToolInfoT ( const TOOLTIPS_INFO infoPtr,
TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1448 of file tooltips.c.

1449{
1450 INT nTool;
1451 HWND hwnd;
1452
1453 if (!ti) return FALSE;
1454 if (ti->cbSize < TTTOOLINFOW_V1_SIZE)
1455 return FALSE;
1456 if (infoPtr->uNumTools == 0)
1457 return FALSE;
1458
1459 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, ti);
1460 if (nTool == -1)
1461 return FALSE;
1462
1463 TRACE("tool %d\n", nTool);
1464
1465 hwnd = ti->hwnd;
1466 TOOLTIPS_CopyInfoT (infoPtr, nTool, ti, isW);
1467 ti->hwnd = hwnd;
1468
1469 return TRUE;
1470}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_Hide()

static void TOOLTIPS_Hide ( TOOLTIPS_INFO infoPtr)
static

Definition at line 909 of file tooltips.c.

910{
911 TTTOOL_INFO *toolPtr;
912 NMHDR hdr;
913
914 TRACE("Hide tooltip %d, %p.\n", infoPtr->nCurrentTool, infoPtr->hwndSelf);
915
916 if (infoPtr->nCurrentTool == -1)
917 return;
918
919 toolPtr = &infoPtr->tools[infoPtr->nCurrentTool];
920 KillTimer (infoPtr->hwndSelf, ID_TIMERPOP);
921
922 hdr.hwndFrom = infoPtr->hwndSelf;
923 hdr.idFrom = toolPtr->uId;
924 hdr.code = TTN_POP;
925 SendMessageW (toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&hdr);
926
927 infoPtr->nCurrentTool = -1;
928
929 SetWindowPos (infoPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0,
931}
#define ID_TIMERPOP
Definition: tooltips.c:154
char hdr[14]
Definition: iptest.cpp:33
#define TTN_POP
Definition: commctrl.h:1875
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)

Referenced by TOOLTIPS_Activate(), TOOLTIPS_DelToolT(), TOOLTIPS_MouseMessage(), TOOLTIPS_Pop(), TOOLTIPS_RelayEvent(), TOOLTIPS_SetToolInfoT(), and TOOLTIPS_Timer().

◆ TOOLTIPS_HitTestT()

static LRESULT TOOLTIPS_HitTestT ( const TOOLTIPS_INFO infoPtr,
LPTTHITTESTINFOW  lptthit,
BOOL  isW 
)
static

Definition at line 1474 of file tooltips.c.

1476{
1477 INT nTool;
1478
1479 if (lptthit == 0)
1480 return FALSE;
1481
1482 nTool = TOOLTIPS_GetToolFromPoint (infoPtr, lptthit->hwnd, &lptthit->pt);
1483 if (nTool == -1)
1484 return FALSE;
1485
1486 TRACE("tool %d\n", nTool);
1487
1488 /* copy tool data */
1489 if (lptthit->ti.cbSize >= TTTOOLINFOW_V1_SIZE)
1490 TOOLTIPS_CopyInfoT (infoPtr, nTool, &lptthit->ti, isW);
1491
1492 return TRUE;
1493}
TTTOOLINFOW ti
Definition: commctrl.h:1866

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_InitSystemSettings()

static void TOOLTIPS_InitSystemSettings ( TOOLTIPS_INFO infoPtr)
static

Definition at line 207 of file tooltips.c.

208{
209 NONCLIENTMETRICSW nclm;
210
211 infoPtr->clrBk = comctl32_color.clrInfoBk;
213
214 DeleteObject (infoPtr->hFont);
215 nclm.cbSize = sizeof(nclm);
216 SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, sizeof(nclm), &nclm, 0);
217 infoPtr->hFont = CreateFontIndirectW (&nclm.lfStatusFont);
218
219 DeleteObject (infoPtr->hTitleFont);
220 nclm.lfStatusFont.lfWeight = FW_BOLD;
221 infoPtr->hTitleFont = CreateFontIndirectW (&nclm.lfStatusFont);
222}
COMCTL32_SysColor comctl32_color
Definition: commctrl.c:82
COLORREF clrInfoText
Definition: comctl32.h:181
COLORREF clrInfoBk
Definition: comctl32.h:180
#define FW_BOLD
Definition: wingdi.h:378
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)

Referenced by TOOLTIPS_Create(), and TOOLTIPS_WinIniChange().

◆ TOOLTIPS_IsCallbackString()

static BOOL TOOLTIPS_IsCallbackString ( LPCWSTR  str,
BOOL  isW 
)
inlinestatic

Definition at line 188 of file tooltips.c.

189{
190 if (isW)
191 return str == LPSTR_TEXTCALLBACKW;
192 else
193 return (LPCSTR)str == LPSTR_TEXTCALLBACKA;
194}
const WCHAR * str
const char * LPCSTR
Definition: xmlstorage.h:183

Referenced by TOOLTIPS_AddToolT(), TOOLTIPS_SetToolInfoT(), and TOOLTIPS_UpdateTipTextT().

◆ TOOLTIPS_IsWindowActive()

static BOOL TOOLTIPS_IsWindowActive ( HWND  hwnd)
static

Definition at line 1053 of file tooltips.c.

1054{
1055 HWND hwndActive = GetActiveWindow ();
1056 if (!hwndActive)
1057 return FALSE;
1058 if (hwndActive == hwnd)
1059 return TRUE;
1060 return IsChild (hwndActive, hwnd);
1061}
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)

Referenced by TOOLTIPS_CheckTool().

◆ TOOLTIPS_MouseMessage()

static LRESULT TOOLTIPS_MouseMessage ( TOOLTIPS_INFO infoPtr)
static

Definition at line 1985 of file tooltips.c.

1986{
1987 TOOLTIPS_Hide (infoPtr);
1988
1989 return 0;
1990}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_NCCreate()

static LRESULT TOOLTIPS_NCCreate ( HWND  hwnd)
static

Definition at line 1994 of file tooltips.c.

1995{
1996 DWORD dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
1997 DWORD dwExStyle = GetWindowLongW (hwnd, GWL_EXSTYLE);
1998
1999 dwStyle &= ~(WS_CHILD | /*WS_MAXIMIZE |*/ WS_BORDER | WS_DLGFRAME);
2000 dwStyle |= (WS_POPUP | WS_BORDER | WS_CLIPSIBLINGS);
2001
2002 /* WS_BORDER only draws a border round the window rect, not the
2003 * window region, therefore it is useless to us in balloon mode */
2004 if (dwStyle & TTS_BALLOON) dwStyle &= ~WS_BORDER;
2005
2006 SetWindowLongW (hwnd, GWL_STYLE, dwStyle);
2007
2008 dwExStyle |= WS_EX_TOOLWINDOW;
2009 SetWindowLongW (hwnd, GWL_EXSTYLE, dwExStyle);
2010
2011 return TRUE;
2012}
#define WS_CHILD
Definition: pedump.c:617
#define WS_BORDER
Definition: pedump.c:625
#define WS_POPUP
Definition: pedump.c:616
#define WS_DLGFRAME
Definition: pedump.c:626
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define GWL_EXSTYLE
Definition: winuser.h:851

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_NCHitTest()

static LRESULT TOOLTIPS_NCHitTest ( const TOOLTIPS_INFO infoPtr,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 2016 of file tooltips.c.

2017{
2018 INT nTool = (infoPtr->bTrackActive) ? infoPtr->nTrackTool : infoPtr->nTool;
2019
2020 TRACE(" nTool=%d\n", nTool);
2021
2022 if ((nTool > -1) && (nTool < infoPtr->uNumTools)) {
2023 if (infoPtr->tools[nTool].uFlags & TTF_TRANSPARENT) {
2024 TRACE("-- in transparent mode\n");
2025 return HTTRANSPARENT;
2026 }
2027 }
2028
2029 return DefWindowProcW (infoPtr->hwndSelf, WM_NCHITTEST, wParam, lParam);
2030}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TTF_TRANSPARENT
Definition: commctrl.h:1770
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_NCHITTEST
Definition: winuser.h:1686
#define HTTRANSPARENT
Definition: winuser.h:2473

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_NewToolRectT()

static LRESULT TOOLTIPS_NewToolRectT ( TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW ti 
)
static

Definition at line 1497 of file tooltips.c.

1498{
1499 INT nTool;
1500
1501 if (!ti) return 0;
1502 if (ti->cbSize < TTTOOLINFOW_V1_SIZE)
1503 return FALSE;
1504
1505 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, ti);
1506
1507 TRACE("nTool = %d, rect = %s\n", nTool, wine_dbgstr_rect(&ti->rect));
1508
1509 if (nTool == -1) return 0;
1510
1511 infoPtr->tools[nTool].rect = ti->rect;
1512
1513 return 0;
1514}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_notify_customdraw()

static DWORD TOOLTIPS_notify_customdraw ( DWORD  dwDrawStage,
NMTTCUSTOMDRAW lpnmttcd 
)
inlinestatic

Definition at line 243 of file tooltips.c.

244{
246 lpnmttcd->nmcd.dwDrawStage = dwDrawStage;
247
248 TRACE("Notifying stage %d, flags %x, id %x\n", lpnmttcd->nmcd.dwDrawStage,
249 lpnmttcd->uDrawFlags, lpnmttcd->nmcd.hdr.code);
250
252 0, (LPARAM)lpnmttcd);
253
254 TRACE("Notify result %x\n", (unsigned int)result);
255
256 return result;
257}
GLuint64EXT * result
Definition: glext.h:11304

Referenced by TOOLTIPS_Refresh().

◆ TOOLTIPS_NotifyFormat()

static LRESULT TOOLTIPS_NotifyFormat ( TOOLTIPS_INFO infoPtr,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 2034 of file tooltips.c.

2035{
2036#ifdef __REACTOS__
2037 TTTOOL_INFO *toolPtr = infoPtr->tools;
2038 LRESULT nResult;
2039
2040 TRACE("infoPtr=%p wParam=%lx lParam=%p\n", infoPtr, wParam, (PVOID)lParam);
2041
2042 if (lParam == NF_QUERY) {
2043 if (toolPtr->bNotifyUnicode) {
2044 return NFR_UNICODE;
2045 } else {
2046 return NFR_ANSI;
2047 }
2048 }
2049 else if (lParam == NF_REQUERY) {
2050 nResult = SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT,
2051 (WPARAM)infoPtr->hwndSelf, (LPARAM)NF_QUERY);
2052 if (nResult == NFR_ANSI) {
2053 toolPtr->bNotifyUnicode = FALSE;
2054 TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n");
2055 } else if (nResult == NFR_UNICODE) {
2056 toolPtr->bNotifyUnicode = TRUE;
2057 TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n");
2058 } else {
2059 TRACE (" -- WM_NOTIFYFORMAT returns: error!\n");
2060 }
2061 return nResult;
2062 }
2063#else
2064 FIXME ("hwnd=%p wParam=%lx lParam=%lx\n", infoPtr->hwndSelf, wParam, lParam);
2065#endif
2066
2067 return 0;
2068}
#define FIXME(fmt,...)
Definition: debug.h:111
#define NF_REQUERY
Definition: winuser.h:2461

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_OnWMGetText()

static LRESULT TOOLTIPS_OnWMGetText ( const TOOLTIPS_INFO infoPtr,
WPARAM  size,
LPWSTR  pszText 
)
static

Definition at line 2132 of file tooltips.c.

2133{
2134 LRESULT res;
2135
2136 if(!size)
2137 return 0;
2138
2139 res = min(strlenW(infoPtr->szTipText)+1, size);
2140 memcpy(pszText, infoPtr->szTipText, res*sizeof(WCHAR));
2141 pszText[res-1] = '\0';
2142 return res-1;
2143}
GLuint res
Definition: glext.h:9613
#define min(a, b)
Definition: monoChain.cc:55

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_Paint()

static LRESULT TOOLTIPS_Paint ( const TOOLTIPS_INFO infoPtr,
HDC  hDC 
)
static

Definition at line 2072 of file tooltips.c.

2073{
2074 HDC hdc;
2075 PAINTSTRUCT ps;
2076
2077 hdc = (hDC == NULL) ? BeginPaint (infoPtr->hwndSelf, &ps) : hDC;
2078 TOOLTIPS_Refresh (infoPtr, hdc);
2079 if (!hDC)
2080 EndPaint (infoPtr->hwndSelf, &ps);
2081 return 0;
2082}
static HDC hDC
Definition: 3dtext.c:33
static void TOOLTIPS_Refresh(const TOOLTIPS_INFO *infoPtr, HDC hdc)
Definition: tooltips.c:260
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_Pop()

static LRESULT TOOLTIPS_Pop ( TOOLTIPS_INFO infoPtr)
inlinestatic

Definition at line 1518 of file tooltips.c.

1519{
1520 TOOLTIPS_Hide (infoPtr);
1521
1522 return 0;
1523}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_Refresh()

static void TOOLTIPS_Refresh ( const TOOLTIPS_INFO infoPtr,
HDC  hdc 
)
static

Definition at line 260 of file tooltips.c.

261{
262 RECT rc;
263 INT oldBkMode;
264 HFONT hOldFont;
265 HBRUSH hBrush;
267 HRGN hRgn = NULL;
268 DWORD dwStyle = GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE);
269 NMTTCUSTOMDRAW nmttcd;
270 DWORD cdmode;
271
272 if (infoPtr->nMaxTipWidth > -1)
276 GetClientRect (infoPtr->hwndSelf, &rc);
277
278 hBrush = CreateSolidBrush(infoPtr->clrBk);
279
280 oldBkMode = SetBkMode (hdc, TRANSPARENT);
281 SetTextColor (hdc, infoPtr->clrText);
282 hOldFont = SelectObject (hdc, infoPtr->hFont);
283
284 /* Custom draw - Call PrePaint once initial properties set up */
285 /* Note: Contrary to MSDN, CDRF_SKIPDEFAULT still draws a tooltip */
286 TOOLTIPS_customdraw_fill(infoPtr, &nmttcd, hdc, &rc, uFlags);
287 cdmode = TOOLTIPS_notify_customdraw(CDDS_PREPAINT, &nmttcd);
288 uFlags = nmttcd.uDrawFlags;
289
290 if (dwStyle & TTS_BALLOON)
291 {
292 /* create a region to store result into */
293 hRgn = CreateRectRgn(0, 0, 0, 0);
294
295 GetWindowRgn(infoPtr->hwndSelf, hRgn);
296
297 /* fill the background */
298 FillRgn(hdc, hRgn, hBrush);
299 DeleteObject(hBrush);
300 hBrush = NULL;
301 }
302 else
303 {
304 /* fill the background */
305 FillRect(hdc, &rc, hBrush);
306 DeleteObject(hBrush);
307 hBrush = NULL;
308 }
309
310 if ((dwStyle & TTS_BALLOON) || infoPtr->pszTitle)
311 {
312 /* calculate text rectangle */
313 rc.left += (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.left);
314 rc.top += (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.top);
315 rc.right -= (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.right);
316 rc.bottom -= (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.bottom);
317 if(infoPtr->bToolBelow) rc.top += BALLOON_STEMHEIGHT;
318
319 if (infoPtr->pszTitle)
320 {
321 RECT rcTitle = {rc.left, rc.top, rc.right, rc.bottom};
322 int height;
323 BOOL icon_present;
324 HFONT prevFont;
325
326 /* draw icon */
327 icon_present = infoPtr->hTitleIcon &&
328 DrawIconEx(hdc, rc.left, rc.top, infoPtr->hTitleIcon,
330 if (icon_present)
332
333 rcTitle.bottom = rc.top + ICON_HEIGHT;
334
335 /* draw title text */
336 prevFont = SelectObject (hdc, infoPtr->hTitleFont);
337 height = DrawTextW(hdc, infoPtr->pszTitle, -1, &rcTitle, DT_BOTTOM | DT_SINGLELINE | DT_NOPREFIX);
338 SelectObject (hdc, prevFont);
340 }
341 }
342 else
343 {
344 /* calculate text rectangle */
345 rc.left += (NORMAL_TEXT_MARGIN + infoPtr->rcMargin.left);
346 rc.top += (NORMAL_TEXT_MARGIN + infoPtr->rcMargin.top);
347 rc.right -= (NORMAL_TEXT_MARGIN + infoPtr->rcMargin.right);
348 rc.bottom -= (NORMAL_TEXT_MARGIN + infoPtr->rcMargin.bottom);
349 }
350
351 /* draw text */
352#ifdef __REACTOS__
354#endif
355 DrawTextW (hdc, infoPtr->szTipText, -1, &rc, uFlags);
356
357 /* Custom draw - Call PostPaint after drawing */
358 if (cdmode & CDRF_NOTIFYPOSTPAINT) {
360 }
361
362 /* be polite and reset the things we changed in the dc */
363 SelectObject (hdc, hOldFont);
364 SetBkMode (hdc, oldBkMode);
365
366 if (dwStyle & TTS_BALLOON)
367 {
368 /* frame region because default window proc doesn't do it */
371
373 FrameRgn(hdc, hRgn, hBrush, width, height);
374 }
375
376 if (hRgn)
378}
static void TOOLTIPS_customdraw_fill(const TOOLTIPS_INFO *infoPtr, NMTTCUSTOMDRAW *lpnmttcd, HDC hdc, const RECT *rcBounds, UINT uFlags)
Definition: tooltips.c:226
static DWORD TOOLTIPS_notify_customdraw(DWORD dwDrawStage, NMTTCUSTOMDRAW *lpnmttcd)
Definition: tooltips.c:243
unsigned int BOOL
Definition: ntddk_ex.h:94
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
static HRGN hRgn
Definition: mapping.c:33
#define CDRF_NOTIFYPOSTPAINT
Definition: commctrl.h:274
#define CDDS_PREPAINT
Definition: commctrl.h:280
#define CDDS_POSTPAINT
Definition: commctrl.h:281
BOOL bToolBelow
Definition: tooltips.c:146
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI FrameRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH, _In_ int, _In_ int)
#define DI_NORMAL
Definition: wingdi.h:72
#define TRANSPARENT
Definition: wingdi.h:950
int WINAPI FillRgn(_In_ HDC, _In_ HRGN, _In_ HBRUSH)
Definition: painting.c:183
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1056
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define SM_CYEDGE
Definition: winuser.h:1009
#define COLOR_WINDOWFRAME
Definition: winuser.h:919
#define SM_CXEDGE
Definition: winuser.h:1008
int WINAPI GetWindowRgn(_In_ HWND, _In_ HRGN)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:2028
#define SM_CXDLGFRAME
Definition: winuser.h:966
#define DT_BOTTOM
Definition: winuser.h:525
#define SM_CYDLGFRAME
Definition: winuser.h:968
int WINAPI GetSystemMetrics(_In_ int)

Referenced by TOOLTIPS_Paint().

◆ TOOLTIPS_Register()

VOID TOOLTIPS_Register ( void  )

Definition at line 2419 of file tooltips.c.

2420{
2421 WNDCLASSW wndClass;
2422
2423 ZeroMemory (&wndClass, sizeof(WNDCLASSW));
2426 wndClass.cbClsExtra = 0;
2427 wndClass.cbWndExtra = sizeof(TOOLTIPS_INFO *);
2428 wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
2429 wndClass.hbrBackground = 0;
2430 wndClass.lpszClassName = TOOLTIPS_CLASSW;
2431
2432 RegisterClassW (&wndClass);
2433
2441}
#define IDI_TT_WARN_SM
Definition: comctl32.h:107
#define IDI_TT_ERROR_SM
Definition: comctl32.h:108
#define IDI_TT_INFO_SM
Definition: comctl32.h:106
HMODULE COMCTL32_hModule
Definition: commctrl.c:79
static LRESULT CALLBACK TOOLTIPS_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: tooltips.c:2239
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1707
#define TTI_NONE
Definition: commctrl.h:1779
#define TTI_INFO
Definition: commctrl.h:1780
#define TTI_WARNING
Definition: commctrl.h:1781
LPCWSTR lpszClassName
Definition: winuser.h:3185
HBRUSH hbrBackground
Definition: winuser.h:3183
int cbClsExtra
Definition: winuser.h:3178
UINT style
Definition: winuser.h:3176
WNDPROC lpfnWndProc
Definition: winuser.h:3177
int cbWndExtra
Definition: winuser.h:3179
HCURSOR hCursor
Definition: winuser.h:3182
#define IMAGE_ICON
Definition: winuser.h:212
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2203
#define IDC_ARROW
Definition: winuser.h:687
#define CS_DBLCLKS
Definition: winuser.h:651
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2105
#define CS_GLOBALCLASS
Definition: winuser.h:652
#define CS_SAVEBITS
Definition: winuser.h:657
#define MAKEINTRESOURCE
Definition: winuser.h:591
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by DllMain().

◆ TOOLTIPS_RelayEvent()

static LRESULT TOOLTIPS_RelayEvent ( TOOLTIPS_INFO infoPtr,
LPMSG  lpMsg 
)
static

Definition at line 1527 of file tooltips.c.

1528{
1529 POINT pt;
1530 INT nOldTool;
1531
1532 if (!lpMsg) {
1533 ERR("lpMsg == NULL\n");
1534 return 0;
1535 }
1536
1537 switch (lpMsg->message) {
1538 case WM_LBUTTONDOWN:
1539 case WM_LBUTTONUP:
1540 case WM_MBUTTONDOWN:
1541 case WM_MBUTTONUP:
1542 case WM_RBUTTONDOWN:
1543 case WM_RBUTTONUP:
1544 TOOLTIPS_Hide (infoPtr);
1545 break;
1546
1547 case WM_MOUSEMOVE:
1548 pt.x = (short)LOWORD(lpMsg->lParam);
1549 pt.y = (short)HIWORD(lpMsg->lParam);
1550 nOldTool = infoPtr->nTool;
1551 infoPtr->nTool = TOOLTIPS_GetToolFromPoint(infoPtr, lpMsg->hwnd,
1552 &pt);
1553 TRACE("tool (%p) %d %d %d\n", infoPtr->hwndSelf, nOldTool,
1554 infoPtr->nTool, infoPtr->nCurrentTool);
1555 TRACE("WM_MOUSEMOVE (%p %s)\n", infoPtr->hwndSelf, wine_dbgstr_point(&pt));
1556
1557 if (infoPtr->nTool != nOldTool) {
1558 if(infoPtr->nTool == -1) { /* Moved out of all tools */
1559 TOOLTIPS_Hide(infoPtr);
1560 KillTimer(infoPtr->hwndSelf, ID_TIMERLEAVE);
1561 } else if (nOldTool == -1) { /* Moved from outside */
1562 if(infoPtr->bActive) {
1563 SetTimer(infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nInitialTime, 0);
1564 TRACE("timer 1 started\n");
1565 }
1566 } else { /* Moved from one to another */
1567 TOOLTIPS_Hide (infoPtr);
1568 KillTimer(infoPtr->hwndSelf, ID_TIMERLEAVE);
1569 if(infoPtr->bActive) {
1570 SetTimer (infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nReshowTime, 0);
1571 TRACE("timer 1 started\n");
1572 }
1573 }
1574 } else if(infoPtr->nCurrentTool != -1) { /* restart autopop */
1575 KillTimer(infoPtr->hwndSelf, ID_TIMERPOP);
1576 SetTimer(infoPtr->hwndSelf, ID_TIMERPOP, infoPtr->nAutoPopTime, 0);
1577 TRACE("timer 2 restarted\n");
1578 } else if(infoPtr->nTool != -1 && infoPtr->bActive) {
1579 /* previous show attempt didn't result in tooltip so try again */
1580 SetTimer(infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nInitialTime, 0);
1581 TRACE("timer 1 started\n");
1582 }
1583 break;
1584 }
1585
1586 return 0;
1587}
static const char * wine_dbgstr_point(const POINT *ppt)
Definition: atltest.h:138
#define ID_TIMERSHOW
Definition: tooltips.c:153
#define ID_TIMERLEAVE
Definition: tooltips.c:155
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:94
UINT message
Definition: winuser.h:3115
HWND hwnd
Definition: winuser.h:3114
LPARAM lParam
Definition: winuser.h:3117
#define HIWORD(l)
Definition: typedefs.h:247
#define WM_RBUTTONUP
Definition: winuser.h:1780
#define WM_MOUSEMOVE
Definition: winuser.h:1775
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_RBUTTONDOWN
Definition: winuser.h:1779
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define WM_MBUTTONUP
Definition: winuser.h:1783
#define WM_MBUTTONDOWN
Definition: winuser.h:1782

Referenced by TOOLTIPS_SubclassProc(), and TOOLTIPS_WindowProc().

◆ TOOLTIPS_ResetSubclass()

static void TOOLTIPS_ResetSubclass ( const TTTOOL_INFO toolPtr)
static

Definition at line 1208 of file tooltips.c.

1209{
1210 /* Reset subclassing data. */
1211 if (toolPtr->uInternalFlags & TTF_SUBCLASS)
1212 SetWindowSubclass(toolPtr->uInternalFlags & TTF_IDISHWND ? (HWND)toolPtr->uId : toolPtr->hwnd,
1213 TOOLTIPS_SubclassProc, 1, 0);
1214}

Referenced by TOOLTIPS_DelToolT(), and TOOLTIPS_Destroy().

◆ TOOLTIPS_SetDelayTime()

static LRESULT TOOLTIPS_SetDelayTime ( TOOLTIPS_INFO infoPtr,
DWORD  duration,
INT  nTime 
)
static

Definition at line 1591 of file tooltips.c.

1592{
1593 switch (duration) {
1594 case TTDT_AUTOMATIC:
1595 if (nTime <= 0)
1596 nTime = GetDoubleClickTime();
1597 infoPtr->nReshowTime = nTime / 5;
1598 infoPtr->nAutoPopTime = nTime * 10;
1599 infoPtr->nInitialTime = nTime;
1600 break;
1601
1602 case TTDT_RESHOW:
1603 if(nTime < 0)
1604 nTime = GetDoubleClickTime() / 5;
1605 infoPtr->nReshowTime = nTime;
1606 break;
1607
1608 case TTDT_AUTOPOP:
1609 if(nTime < 0)
1610 nTime = GetDoubleClickTime() * 10;
1611 infoPtr->nAutoPopTime = nTime;
1612 break;
1613
1614 case TTDT_INITIAL:
1615 if(nTime < 0)
1616 nTime = GetDoubleClickTime();
1617 infoPtr->nInitialTime = nTime;
1618 break;
1619
1620 default:
1621 WARN("Invalid duration flag %x\n", duration);
1622 break;
1623 }
1624
1625 return 0;
1626}
UINT WINAPI GetDoubleClickTime(void)
Definition: ntwrapper.h:314

Referenced by TOOLTIPS_Create(), and TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetFont()

static LRESULT TOOLTIPS_SetFont ( TOOLTIPS_INFO infoPtr,
HFONT  hFont,
BOOL  redraw 
)
static

Definition at line 2086 of file tooltips.c.

2087{
2088 LOGFONTW lf;
2089
2090 if(!GetObjectW(hFont, sizeof(lf), &lf))
2091 return 0;
2092
2093 DeleteObject (infoPtr->hFont);
2094 infoPtr->hFont = CreateFontIndirectW(&lf);
2095
2096 DeleteObject (infoPtr->hTitleFont);
2097 lf.lfWeight = FW_BOLD;
2098 infoPtr->hTitleFont = CreateFontIndirectW(&lf);
2099
2100 if (redraw && infoPtr->nCurrentTool != -1)
2101 FIXME("full redraw needed\n");
2102
2103 return 0;
2104}
HFONT hFont
Definition: main.c:53
void redraw(int x, int y, int cx, int cy)
Definition: qtewin.cpp:1248
LONG lfWeight
Definition: dimm.idl:63
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetMargin()

static LRESULT TOOLTIPS_SetMargin ( TOOLTIPS_INFO infoPtr,
const RECT rect 
)
static

Definition at line 1630 of file tooltips.c.

1631{
1632 if (rect)
1633 infoPtr->rcMargin = *rect;
1634
1635 return 0;
1636}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetMaxTipWidth()

static LRESULT TOOLTIPS_SetMaxTipWidth ( TOOLTIPS_INFO infoPtr,
INT  MaxWidth 
)
inlinestatic

Definition at line 1640 of file tooltips.c.

1641{
1642 INT nTemp = infoPtr->nMaxTipWidth;
1643
1644 infoPtr->nMaxTipWidth = MaxWidth;
1645
1646 return nTemp;
1647}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetTipBkColor()

static LRESULT TOOLTIPS_SetTipBkColor ( TOOLTIPS_INFO infoPtr,
COLORREF  clrBk 
)
inlinestatic

Definition at line 1651 of file tooltips.c.

1652{
1653 infoPtr->clrBk = clrBk;
1654
1655 return 0;
1656}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetTipTextColor()

static LRESULT TOOLTIPS_SetTipTextColor ( TOOLTIPS_INFO infoPtr,
COLORREF  clrText 
)
inlinestatic

Definition at line 1660 of file tooltips.c.

1661{
1662 infoPtr->clrText = clrText;
1663
1664 return 0;
1665}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetTitleT()

static LRESULT TOOLTIPS_SetTitleT ( TOOLTIPS_INFO infoPtr,
UINT_PTR  uTitleIcon,
LPCWSTR  pszTitle,
BOOL  isW 
)
static

Definition at line 1669 of file tooltips.c.

1671{
1672 UINT size;
1673
1674 TRACE("hwnd = %p, title = %s, icon = %p\n", infoPtr->hwndSelf, debugstr_w(pszTitle),
1675 (void*)uTitleIcon);
1676
1677 Free(infoPtr->pszTitle);
1678
1679 if (pszTitle)
1680 {
1681 if (isW)
1682 {
1683 size = (strlenW(pszTitle)+1)*sizeof(WCHAR);
1684 infoPtr->pszTitle = Alloc(size);
1685 if (!infoPtr->pszTitle)
1686 return FALSE;
1687 memcpy(infoPtr->pszTitle, pszTitle, size);
1688 }
1689 else
1690 {
1691 size = sizeof(WCHAR)*MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszTitle, -1, NULL, 0);
1692 infoPtr->pszTitle = Alloc(size);
1693 if (!infoPtr->pszTitle)
1694 return FALSE;
1695 MultiByteToWideChar(CP_ACP, 0, (LPCSTR)pszTitle, -1, infoPtr->pszTitle, size/sizeof(WCHAR));
1696 }
1697 }
1698 else
1699 infoPtr->pszTitle = NULL;
1700
1701 if (uTitleIcon <= TTI_ERROR)
1702 infoPtr->hTitleIcon = hTooltipIcons[uTitleIcon];
1703 else
1704 infoPtr->hTitleIcon = CopyIcon((HICON)uTitleIcon);
1705
1706 TRACE("icon = %p\n", infoPtr->hTitleIcon);
1707
1708 return TRUE;
1709}
static HICON
Definition: imagelist.c:84
HICON WINAPI CopyIcon(_In_ HICON)
Definition: cursoricon.c:2011

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_SetToolInfoT()

static LRESULT TOOLTIPS_SetToolInfoT ( TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1713 of file tooltips.c.

1714{
1715 TTTOOL_INFO *toolPtr;
1716 INT nTool;
1717
1718 if (!ti) return 0;
1719 if (ti->cbSize < TTTOOLINFOW_V1_SIZE)
1720 return 0;
1721
1722 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, ti);
1723 if (nTool == -1) return 0;
1724
1725 TRACE("tool %d\n", nTool);
1726
1727 toolPtr = &infoPtr->tools[nTool];
1728
1729 /* copy tool data */
1730 toolPtr->uFlags = ti->uFlags;
1731 toolPtr->hwnd = ti->hwnd;
1732 toolPtr->uId = ti->uId;
1733 toolPtr->rect = ti->rect;
1734 toolPtr->hinst = ti->hinst;
1735
1736 if (IS_INTRESOURCE(ti->lpszText)) {
1737 TRACE("set string id %x\n", LOWORD(ti->lpszText));
1738 toolPtr->lpszText = ti->lpszText;
1739 }
1740 else {
1742 toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
1743 else {
1744 if ( (toolPtr->lpszText) &&
1745 !IS_INTRESOURCE(toolPtr->lpszText) ) {
1746 if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW)
1747 Free (toolPtr->lpszText);
1748 toolPtr->lpszText = NULL;
1749 }
1750 if (ti->lpszText) {
1751 if (isW) {
1752 INT len = lstrlenW (ti->lpszText);
1753 toolPtr->lpszText = Alloc ((len+1)*sizeof(WCHAR));
1754 strcpyW (toolPtr->lpszText, ti->lpszText);
1755 }
1756 else {
1758 -1, NULL, 0);
1759 toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
1761 toolPtr->lpszText, len);
1762 }
1763 }
1764 }
1765 }
1766
1767 if (ti->cbSize >= TTTOOLINFOW_V2_SIZE)
1768 toolPtr->lParam = ti->lParam;
1769
1770 if (infoPtr->nCurrentTool == nTool)
1771 {
1772 TOOLTIPS_GetTipText (infoPtr, infoPtr->nCurrentTool, infoPtr->szTipText);
1773
1774 if (infoPtr->szTipText[0] == 0)
1775 TOOLTIPS_Hide(infoPtr);
1776 else
1777 TOOLTIPS_Show (infoPtr, FALSE);
1778 }
1779
1780 return 0;
1781}
static void TOOLTIPS_Show(TOOLTIPS_INFO *infoPtr, BOOL track_activate)
Definition: tooltips.c:598

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_Show()

static void TOOLTIPS_Show ( TOOLTIPS_INFO infoPtr,
BOOL  track_activate 
)
static

Definition at line 598 of file tooltips.c.

599{
600 TTTOOL_INFO *toolPtr;
601 HMONITOR monitor;
602 MONITORINFO mon_info;
603 RECT rect;
604 SIZE size;
605 NMHDR hdr;
606 int ptfx = 0;
608 INT nTool, current;
609
610 if (track_activate)
611 {
612 if (infoPtr->nTrackTool == -1)
613 {
614 TRACE("invalid tracking tool %d\n", infoPtr->nTrackTool);
615 return;
616 }
617 nTool = infoPtr->nTrackTool;
618 }
619 else
620 {
621 if (infoPtr->nTool == -1)
622 {
623 TRACE("invalid tool %d\n", infoPtr->nTool);
624 return;
625 }
626 nTool = infoPtr->nTool;
627 }
628
629 TRACE("Show tooltip pre %d, %p\n", nTool, infoPtr->hwndSelf);
630
631 current = infoPtr->nCurrentTool;
632 if (!track_activate)
633 infoPtr->nCurrentTool = infoPtr->nTool;
634
635 TOOLTIPS_GetTipText (infoPtr, nTool, infoPtr->szTipText);
636
637 if (infoPtr->szTipText[0] == '\0')
638 {
639 infoPtr->nCurrentTool = current;
640 return;
641 }
642
643 toolPtr = &infoPtr->tools[nTool];
644 TOOLTIPS_CalcTipSize (infoPtr, &size);
645
646 TRACE("Show tooltip %d, %s, size %d x %d\n", nTool, debugstr_w(infoPtr->szTipText),
647 size.cx, size.cy);
648
649 if (track_activate && (toolPtr->uFlags & TTF_TRACK))
650 {
651 rect.left = infoPtr->xTrackPos;
652 rect.top = infoPtr->yTrackPos;
653 ptfx = rect.left;
654
655 if (toolPtr->uFlags & TTF_CENTERTIP)
656 {
657 rect.left -= (size.cx / 2);
658 if (!(style & TTS_BALLOON))
659 rect.top -= (size.cy / 2);
660 }
661 if (!(infoPtr->bToolBelow = (infoPtr->yTrackPos + size.cy <= GetSystemMetrics(SM_CYSCREEN))))
662 rect.top -= size.cy;
663
664 if (!(toolPtr->uFlags & TTF_ABSOLUTE))
665 {
666 if (style & TTS_BALLOON)
667 rect.left -= BALLOON_STEMINDENT;
668 else
669 {
670 RECT rcTool;
671
672 if (toolPtr->uFlags & TTF_IDISHWND)
673 GetWindowRect ((HWND)toolPtr->uId, &rcTool);
674 else
675 {
676 rcTool = toolPtr->rect;
677 MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rcTool, 2);
678 }
679
680 /* smart placement */
681 if ((rect.left + size.cx > rcTool.left) && (rect.left < rcTool.right) &&
682 (rect.top + size.cy > rcTool.top) && (rect.top < rcTool.bottom))
683 rect.left = rcTool.right;
684 }
685 }
686 }
687 else
688 {
689 if (toolPtr->uFlags & TTF_CENTERTIP)
690 {
691 RECT rc;
692
693 if (toolPtr->uFlags & TTF_IDISHWND)
694 GetWindowRect ((HWND)toolPtr->uId, &rc);
695 else {
696 rc = toolPtr->rect;
697 MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2);
698 }
699 rect.left = (rc.left + rc.right - size.cx) / 2;
700 if (style & TTS_BALLOON)
701 {
702 ptfx = rc.left + ((rc.right - rc.left) / 2);
703
704 /* CENTERTIP ballon tooltips default to below the field
705 * if they fit on the screen */
707 {
708 rect.top = rc.top - size.cy;
709 infoPtr->bToolBelow = FALSE;
710 }
711 else
712 {
713 infoPtr->bToolBelow = TRUE;
714 rect.top = rc.bottom;
715 }
716 rect.left = max(0, rect.left - BALLOON_STEMINDENT);
717 }
718 else
719 {
720 rect.top = rc.bottom + 2;
721 infoPtr->bToolBelow = TRUE;
722 }
723 }
724 else
725 {
727 if (style & TTS_BALLOON)
728 {
729 ptfx = rect.left;
730 if(rect.top - size.cy >= 0)
731 {
732 rect.top -= size.cy;
733 infoPtr->bToolBelow = FALSE;
734 }
735 else
736 {
737 infoPtr->bToolBelow = TRUE;
738 rect.top += 20;
739 }
740 rect.left = max(0, rect.left - BALLOON_STEMINDENT);
741 }
742 else
743 {
744 rect.top += 20;
745 infoPtr->bToolBelow = TRUE;
746 }
747 }
748 }
749
750 TRACE("pos %d - %d\n", rect.left, rect.top);
751
752 rect.right = rect.left + size.cx;
753 rect.bottom = rect.top + size.cy;
754
755 /* check position */
756
757 monitor = MonitorFromRect( &rect, MONITOR_DEFAULTTOPRIMARY );
758 mon_info.cbSize = sizeof(mon_info);
759 GetMonitorInfoW( monitor, &mon_info );
760
761#ifdef __REACTOS__
762 if (rect.right > mon_info.rcMonitor.right)
763 {
766 if (rect.right > mon_info.rcMonitor.right)
767 {
768 rect.left -= (rect.right - mon_info.rcMonitor.right);
769 rect.right = mon_info.rcMonitor.right;
770 }
771 }
772
773 if (rect.left < mon_info.rcMonitor.left)
774 {
775 rect.right += abs(rect.left);
776 rect.left = 0;
777 }
778
779 if (rect.bottom > mon_info.rcMonitor.bottom)
780 {
781 RECT rc;
782 if (toolPtr->uFlags & TTF_IDISHWND)
783 {
784 GetWindowRect((HWND)toolPtr->uId, &rc);
785 }
786 else
787 {
788 rc = toolPtr->rect;
789 MapWindowPoints(toolPtr->hwnd, NULL, (LPPOINT)&rc, 2);
790 }
791 rect.bottom = rc.top - 2;
792 rect.top = rect.bottom - size.cy;
793 }
794#else
795 if( rect.right > mon_info.rcWork.right ) {
796 rect.left -= rect.right - mon_info.rcWork.right + 2;
797 rect.right = mon_info.rcWork.right - 2;
798 }
799 if (rect.left < mon_info.rcWork.left) rect.left = mon_info.rcWork.left;
800
801 if( rect.bottom > mon_info.rcWork.bottom ) {
802 RECT rc;
803
804 if (toolPtr->uFlags & TTF_IDISHWND)
805 GetWindowRect ((HWND)toolPtr->uId, &rc);
806 else {
807 rc = toolPtr->rect;
808 MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2);
809 }
810 rect.bottom = rc.top - 2;
811 rect.top = rect.bottom - size.cy;
812 }
813#endif // __REACTOS__
814
817
818 if (style & TTS_BALLOON)
819 {
820 HRGN hRgn;
821 HRGN hrStem;
822 POINT pts[3];
823
824 ptfx -= rect.left;
825
826 if(infoPtr->bToolBelow)
827 {
828 pts[0].x = ptfx;
829 pts[0].y = 0;
830#ifdef __REACTOS__
831 pts[1].x = max(BALLOON_STEMINDENT, ptfx - BALLOON_STEMWIDTH);
832#else
833 pts[1].x = max(BALLOON_STEMINDENT, ptfx - (BALLOON_STEMWIDTH / 2));
834#endif
835 pts[1].y = BALLOON_STEMHEIGHT;
836 pts[2].x = pts[1].x + BALLOON_STEMWIDTH;
837 pts[2].y = pts[1].y;
838 if(pts[2].x > (rect.right - rect.left) - BALLOON_STEMINDENT)
839 {
840 pts[2].x = (rect.right - rect.left) - BALLOON_STEMINDENT;
841 pts[1].x = pts[2].x - BALLOON_STEMWIDTH;
842 }
843 }
844 else
845 {
846#ifdef __REACTOS__
847 pts[0].x = max(BALLOON_STEMINDENT, ptfx - BALLOON_STEMWIDTH);
848#else
849 pts[0].x = max(BALLOON_STEMINDENT, ptfx - (BALLOON_STEMWIDTH / 2));
850#endif
851 pts[0].y = (rect.bottom - rect.top) - BALLOON_STEMHEIGHT;
852 pts[1].x = pts[0].x + BALLOON_STEMWIDTH;
853 pts[1].y = pts[0].y;
854 pts[2].x = ptfx;
855 pts[2].y = (rect.bottom - rect.top);
856 if(pts[1].x > (rect.right - rect.left) - BALLOON_STEMINDENT)
857 {
858 pts[1].x = (rect.right - rect.left) - BALLOON_STEMINDENT;
859 pts[0].x = pts[1].x - BALLOON_STEMWIDTH;
860 }
861 }
862
863 hrStem = CreatePolygonRgn(pts, ARRAY_SIZE(pts), ALTERNATE);
864
866 (infoPtr->bToolBelow ? BALLOON_STEMHEIGHT : 0),
867 rect.right - rect.left,
868#ifdef __REACTOS__
869 (infoPtr->bToolBelow ? rect.bottom - rect.top : rect.bottom - rect.top - BALLOON_STEMHEIGHT + 1),
870#else
871 (infoPtr->bToolBelow ? rect.bottom - rect.top : rect.bottom - rect.top - BALLOON_STEMHEIGHT),
872#endif
874
875 CombineRgn(hRgn, hRgn, hrStem, RGN_OR);
876 DeleteObject(hrStem);
877
878 SetWindowRgn(infoPtr->hwndSelf, hRgn, FALSE);
879 /* we don't free the region handle as the system deletes it when
880 * it is no longer needed */
881 }
882
883 SetWindowPos (infoPtr->hwndSelf, NULL, rect.left, rect.top,
884 rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOACTIVATE);
885
886 hdr.hwndFrom = infoPtr->hwndSelf;
887 hdr.idFrom = toolPtr->uId;
888 hdr.code = TTN_SHOW;
889 SendMessageW (toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&hdr);
890
891 SetWindowPos (infoPtr->hwndSelf, HWND_TOPMOST, 0, 0, 0, 0,
893
894 /* repaint the tooltip */
895 InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
896 UpdateWindow(infoPtr->hwndSelf);
897
898 if (!track_activate)
899 {
900 SetTimer (infoPtr->hwndSelf, ID_TIMERPOP, infoPtr->nAutoPopTime, 0);
901 TRACE("timer 2 started\n");
902 SetTimer (infoPtr->hwndSelf, ID_TIMERLEAVE, infoPtr->nReshowTime, 0);
903 TRACE("timer 3 started\n");
904 }
905}
#define ALTERNATE
Definition: constants.h:278
#define ARRAY_SIZE(A)
Definition: main.h:33
#define BALLOON_STEMWIDTH
Definition: tooltips.c:173
#define BALLOON_STEMINDENT
Definition: tooltips.c:174
#define BALLOON_ROUNDEDNESS
Definition: tooltips.c:171
#define abs(i)
Definition: fconv.c:206
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
if(dx< 0)
Definition: linetemp.h:194
struct task_struct * current
Definition: linux.c:32
HMONITOR WINAPI MonitorFromRect(LPCRECT, DWORD)
#define TTN_SHOW
Definition: commctrl.h:1874
#define TTF_CENTERTIP
Definition: commctrl.h:1765
#define TTF_ABSOLUTE
Definition: commctrl.h:1769
#define TTF_TRACK
Definition: commctrl.h:1768
RECT rcMonitor
Definition: winuser.h:3785
DWORD cbSize
Definition: winuser.h:3784
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
else
Definition: tritemp.h:161
HRGN WINAPI CreatePolygonRgn(_In_reads_(cPoint) const POINT *pptl, _In_ int cPoint, _In_ int iMode)
HRGN WINAPI CreateRoundRectRgn(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
#define RGN_OR
Definition: wingdi.h:359
#define SM_CYSCREEN
Definition: winuser.h:960
#define HWND_TOPMOST
Definition: winuser.h:1208
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI SetWindowRgn(_In_ HWND, _In_opt_ HRGN, _In_ BOOL)
#define SWP_NOMOVE
Definition: winuser.h:1244
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define SWP_NOSIZE
Definition: winuser.h:1245
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define SWP_SHOWWINDOW
Definition: winuser.h:1248
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)

Referenced by TOOLTIPS_SetToolInfoT(), TOOLTIPS_Timer(), TOOLTIPS_TrackShow(), and TOOLTIPS_UpdateTipTextT().

◆ TOOLTIPS_SubclassProc()

static LRESULT CALLBACK TOOLTIPS_SubclassProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
UINT_PTR  uId,
DWORD_PTR  dwRef 
)
static

Definition at line 2204 of file tooltips.c.

2205{
2206 TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr ((HWND)dwRef);
2207 MSG msg;
2208
2209 switch (message)
2210 {
2211 case WM_MOUSEMOVE:
2212 case WM_LBUTTONDOWN:
2213 case WM_LBUTTONUP:
2214 case WM_MBUTTONDOWN:
2215 case WM_MBUTTONUP:
2216 case WM_RBUTTONDOWN:
2217 case WM_RBUTTONUP:
2218 if (infoPtr)
2219 {
2220 msg.hwnd = hwnd;
2221 msg.message = message;
2222 msg.wParam = wParam;
2223 msg.lParam = lParam;
2224 TOOLTIPS_RelayEvent(infoPtr, &msg);
2225 }
2226 break;
2227 case WM_NCDESTROY:
2229 break;
2230 default:
2231 break;
2232 }
2233
2235}
#define msg(x)
Definition: auth_time.c:54
BOOL WINAPI RemoveWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
Definition: commctrl.c:1390
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1496
#define TOOLTIPS_GetInfoPtr(hWindow)
Definition: tooltips.c:158
static LRESULT TOOLTIPS_RelayEvent(TOOLTIPS_INFO *infoPtr, LPMSG lpMsg)
Definition: tooltips.c:1527
Definition: tftpd.h:60
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define WM_NCDESTROY
Definition: winuser.h:1684

Referenced by TOOLTIPS_AddToolT(), TOOLTIPS_ResetSubclass(), and TOOLTIPS_SubclassProc().

◆ TOOLTIPS_Timer()

static LRESULT TOOLTIPS_Timer ( TOOLTIPS_INFO infoPtr,
INT  iTimer 
)
static

Definition at line 2146 of file tooltips.c.

2147{
2148 INT nOldTool;
2149
2150 TRACE("timer %d (%p) expired\n", iTimer, infoPtr->hwndSelf);
2151
2152 switch (iTimer) {
2153 case ID_TIMERSHOW:
2154 KillTimer (infoPtr->hwndSelf, ID_TIMERSHOW);
2155 nOldTool = infoPtr->nTool;
2156 if ((infoPtr->nTool = TOOLTIPS_CheckTool (infoPtr, TRUE)) == nOldTool)
2157 TOOLTIPS_Show (infoPtr, FALSE);
2158 break;
2159
2160 case ID_TIMERPOP:
2161 TOOLTIPS_Hide (infoPtr);
2162 break;
2163
2164 case ID_TIMERLEAVE:
2165 nOldTool = infoPtr->nTool;
2166 infoPtr->nTool = TOOLTIPS_CheckTool (infoPtr, FALSE);
2167 TRACE("tool (%p) %d %d %d\n", infoPtr->hwndSelf, nOldTool,
2168 infoPtr->nTool, infoPtr->nCurrentTool);
2169 if (infoPtr->nTool != nOldTool) {
2170 if(infoPtr->nTool == -1) { /* Moved out of all tools */
2171 TOOLTIPS_Hide(infoPtr);
2172 KillTimer(infoPtr->hwndSelf, ID_TIMERLEAVE);
2173 } else if (nOldTool == -1) { /* Moved from outside */
2174 ERR("How did this happen?\n");
2175 } else { /* Moved from one to another */
2176 TOOLTIPS_Hide (infoPtr);
2177 KillTimer(infoPtr->hwndSelf, ID_TIMERLEAVE);
2178 if(infoPtr->bActive) {
2179 SetTimer (infoPtr->hwndSelf, ID_TIMERSHOW, infoPtr->nReshowTime, 0);
2180 TRACE("timer 1 started!\n");
2181 }
2182 }
2183 }
2184 break;
2185
2186 default:
2187 ERR("Unknown timer id %d\n", iTimer);
2188 break;
2189 }
2190 return 0;
2191}
static INT TOOLTIPS_CheckTool(const TOOLTIPS_INFO *infoPtr, BOOL bShowTest)
Definition: tooltips.c:1065

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_TrackActivate()

static LRESULT TOOLTIPS_TrackActivate ( TOOLTIPS_INFO infoPtr,
BOOL  track_activate,
const TTTOOLINFOA ti 
)
static

Definition at line 1785 of file tooltips.c.

1786{
1787 if (track_activate) {
1788
1789 if (!ti) return 0;
1790 if (ti->cbSize < TTTOOLINFOA_V1_SIZE)
1791 return FALSE;
1792
1793 /* activate */
1794 infoPtr->nTrackTool = TOOLTIPS_GetToolFromInfoT (infoPtr, (const TTTOOLINFOW*)ti);
1795 if (infoPtr->nTrackTool != -1) {
1796 TRACE("activated\n");
1797 infoPtr->bTrackActive = TRUE;
1798 TOOLTIPS_TrackShow (infoPtr);
1799 }
1800 }
1801 else {
1802 /* deactivate */
1803 TOOLTIPS_TrackHide (infoPtr);
1804
1805 infoPtr->bTrackActive = FALSE;
1806 infoPtr->nTrackTool = -1;
1807
1808 TRACE("deactivated\n");
1809 }
1810
1811 return 0;
1812}
static void TOOLTIPS_TrackHide(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:942
static void TOOLTIPS_TrackShow(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:935
#define TTTOOLINFOA_V1_SIZE
Definition: commctrl.h:1720

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_TrackHide()

static void TOOLTIPS_TrackHide ( const TOOLTIPS_INFO infoPtr)
static

Definition at line 942 of file tooltips.c.

943{
944 TTTOOL_INFO *toolPtr;
945 NMHDR hdr;
946
947 TRACE("hide tracking tooltip %d\n", infoPtr->nTrackTool);
948
949 if (infoPtr->nTrackTool == -1)
950 return;
951
952 toolPtr = &infoPtr->tools[infoPtr->nTrackTool];
953
954 hdr.hwndFrom = infoPtr->hwndSelf;
955 hdr.idFrom = toolPtr->uId;
956 hdr.code = TTN_POP;
957 SendMessageW (toolPtr->hwnd, WM_NOTIFY, toolPtr->uId, (LPARAM)&hdr);
958
959 SetWindowPos (infoPtr->hwndSelf, HWND_TOP, 0, 0, 0, 0,
961}

Referenced by TOOLTIPS_TrackActivate().

◆ TOOLTIPS_TrackPosition()

static LRESULT TOOLTIPS_TrackPosition ( TOOLTIPS_INFO infoPtr,
LPARAM  coord 
)
static

Definition at line 1816 of file tooltips.c.

1817{
1818 infoPtr->xTrackPos = (INT)LOWORD(coord);
1819 infoPtr->yTrackPos = (INT)HIWORD(coord);
1820
1821 if (infoPtr->bTrackActive) {
1822 TRACE("[%d %d]\n",
1823 infoPtr->xTrackPos, infoPtr->yTrackPos);
1824
1825 TOOLTIPS_TrackShow (infoPtr);
1826 }
1827
1828 return 0;
1829}
GLuint coord
Definition: glext.h:9511
#define INT
Definition: polytest.cpp:20

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_TrackShow()

static void TOOLTIPS_TrackShow ( TOOLTIPS_INFO infoPtr)
static

Definition at line 935 of file tooltips.c.

936{
937 TOOLTIPS_Show(infoPtr, TRUE);
938}

Referenced by TOOLTIPS_TrackActivate(), and TOOLTIPS_TrackPosition().

◆ TOOLTIPS_Unregister()

VOID TOOLTIPS_Unregister ( void  )

Definition at line 2445 of file tooltips.c.

2446{
2447 int i;
2448 for (i = TTI_INFO; i <= TTI_ERROR; i++)
2451}
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2053

Referenced by DllMain().

◆ TOOLTIPS_Update()

static LRESULT TOOLTIPS_Update ( TOOLTIPS_INFO infoPtr)
static

Definition at line 1833 of file tooltips.c.

1834{
1835 if (infoPtr->nCurrentTool != -1)
1836 UpdateWindow (infoPtr->hwndSelf);
1837
1838 return 0;
1839}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_UpdateTipTextT()

static LRESULT TOOLTIPS_UpdateTipTextT ( TOOLTIPS_INFO infoPtr,
const TTTOOLINFOW ti,
BOOL  isW 
)
static

Definition at line 1843 of file tooltips.c.

1844{
1845 TTTOOL_INFO *toolPtr;
1846 INT nTool;
1847
1848 if (!ti) return 0;
1849 if (ti->cbSize < TTTOOLINFOW_V1_SIZE)
1850 return FALSE;
1851
1852 nTool = TOOLTIPS_GetToolFromInfoT (infoPtr, ti);
1853 if (nTool == -1)
1854 return 0;
1855
1856 TRACE("tool %d\n", nTool);
1857
1858 toolPtr = &infoPtr->tools[nTool];
1859
1860 /* copy tool text */
1861 toolPtr->hinst = ti->hinst;
1862
1863 if (IS_INTRESOURCE(ti->lpszText)){
1864 toolPtr->lpszText = ti->lpszText;
1865 }
1866 else if (ti->lpszText) {
1868 toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
1869 else {
1870 if ( (toolPtr->lpszText) &&
1871 !IS_INTRESOURCE(toolPtr->lpszText) ) {
1872 if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW)
1873 Free (toolPtr->lpszText);
1874 toolPtr->lpszText = NULL;
1875 }
1876 if (ti->lpszText) {
1877 if (isW) {
1878 INT len = lstrlenW (ti->lpszText);
1879 toolPtr->lpszText = Alloc ((len+1)*sizeof(WCHAR));
1880 strcpyW (toolPtr->lpszText, ti->lpszText);
1881 }
1882 else {
1884 -1, NULL, 0);
1885 toolPtr->lpszText = Alloc (len * sizeof(WCHAR));
1887 toolPtr->lpszText, len);
1888 }
1889 }
1890 }
1891 }
1892
1893 if(infoPtr->nCurrentTool == -1) return 0;
1894 /* force repaint */
1895 if (infoPtr->bActive)
1896 TOOLTIPS_Show (infoPtr, FALSE);
1897 else if (infoPtr->bTrackActive)
1898 TOOLTIPS_Show (infoPtr, TRUE);
1899
1900 return 0;
1901}

Referenced by TOOLTIPS_WindowProc().

◆ TOOLTIPS_WindowProc()

static LRESULT CALLBACK TOOLTIPS_WindowProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 2239 of file tooltips.c.

2240{
2242
2243 TRACE("hwnd=%p msg=%x wparam=%lx lParam=%lx\n", hwnd, uMsg, wParam, lParam);
2244 if (!infoPtr && (uMsg != WM_CREATE) && (uMsg != WM_NCCREATE))
2245 return DefWindowProcW (hwnd, uMsg, wParam, lParam);
2246 switch (uMsg)
2247 {
2248 case TTM_ACTIVATE:
2249 return TOOLTIPS_Activate (infoPtr, (BOOL)wParam);
2250
2251 case TTM_ADDTOOLA:
2252 case TTM_ADDTOOLW:
2253 return TOOLTIPS_AddToolT (infoPtr, (LPTTTOOLINFOW)lParam, uMsg == TTM_ADDTOOLW);
2254
2255 case TTM_DELTOOLA:
2256 case TTM_DELTOOLW:
2257 return TOOLTIPS_DelToolT (infoPtr, (LPTOOLINFOW)lParam,
2258 uMsg == TTM_DELTOOLW);
2259 case TTM_ENUMTOOLSA:
2260 case TTM_ENUMTOOLSW:
2262 uMsg == TTM_ENUMTOOLSW);
2263 case TTM_GETBUBBLESIZE:
2264 return TOOLTIPS_GetBubbleSize (infoPtr, (LPTTTOOLINFOW)lParam);
2265
2269 uMsg == TTM_GETCURRENTTOOLW);
2270
2271 case TTM_GETDELAYTIME:
2272 return TOOLTIPS_GetDelayTime (infoPtr, (DWORD)wParam);
2273
2274 case TTM_GETMARGIN:
2275 return TOOLTIPS_GetMargin (infoPtr, (LPRECT)lParam);
2276
2277 case TTM_GETMAXTIPWIDTH:
2278 return TOOLTIPS_GetMaxTipWidth (infoPtr);
2279
2280 case TTM_GETTEXTA:
2281 case TTM_GETTEXTW:
2282 return TOOLTIPS_GetTextT (infoPtr, (LPTTTOOLINFOW)lParam,
2283 uMsg == TTM_GETTEXTW);
2284
2285 case TTM_GETTIPBKCOLOR:
2286 return TOOLTIPS_GetTipBkColor (infoPtr);
2287
2289 return TOOLTIPS_GetTipTextColor (infoPtr);
2290
2291 case TTM_GETTOOLCOUNT:
2292 return TOOLTIPS_GetToolCount (infoPtr);
2293
2294 case TTM_GETTOOLINFOA:
2295 case TTM_GETTOOLINFOW:
2296 return TOOLTIPS_GetToolInfoT (infoPtr, (LPTTTOOLINFOW)lParam,
2297 uMsg == TTM_GETTOOLINFOW);
2298
2299 case TTM_HITTESTA:
2300 case TTM_HITTESTW:
2301 return TOOLTIPS_HitTestT (infoPtr, (LPTTHITTESTINFOW)lParam,
2302 uMsg == TTM_HITTESTW);
2303 case TTM_NEWTOOLRECTA:
2304 case TTM_NEWTOOLRECTW:
2305 return TOOLTIPS_NewToolRectT (infoPtr, (LPTTTOOLINFOW)lParam);
2306
2307 case TTM_POP:
2308 return TOOLTIPS_Pop (infoPtr);
2309
2310 case TTM_RELAYEVENT:
2311 return TOOLTIPS_RelayEvent (infoPtr, (LPMSG)lParam);
2312
2313 case TTM_SETDELAYTIME:
2314 return TOOLTIPS_SetDelayTime (infoPtr, (DWORD)wParam, (INT)LOWORD(lParam));
2315
2316 case TTM_SETMARGIN:
2317 return TOOLTIPS_SetMargin (infoPtr, (LPRECT)lParam);
2318
2319 case TTM_SETMAXTIPWIDTH:
2320 return TOOLTIPS_SetMaxTipWidth (infoPtr, (INT)lParam);
2321
2322 case TTM_SETTIPBKCOLOR:
2323 return TOOLTIPS_SetTipBkColor (infoPtr, (COLORREF)wParam);
2324
2326 return TOOLTIPS_SetTipTextColor (infoPtr, (COLORREF)wParam);
2327
2328 case TTM_SETTITLEA:
2329 case TTM_SETTITLEW:
2330 return TOOLTIPS_SetTitleT (infoPtr, (UINT_PTR)wParam, (LPCWSTR)lParam,
2331 uMsg == TTM_SETTITLEW);
2332
2333 case TTM_SETTOOLINFOA:
2334 case TTM_SETTOOLINFOW:
2335 return TOOLTIPS_SetToolInfoT (infoPtr, (LPTTTOOLINFOW)lParam,
2336 uMsg == TTM_SETTOOLINFOW);
2337
2338 case TTM_TRACKACTIVATE:
2340
2341 case TTM_TRACKPOSITION:
2342 return TOOLTIPS_TrackPosition (infoPtr, lParam);
2343
2344 case TTM_UPDATE:
2345 return TOOLTIPS_Update (infoPtr);
2346
2347 case TTM_UPDATETIPTEXTA:
2348 case TTM_UPDATETIPTEXTW:
2350 uMsg == TTM_UPDATETIPTEXTW);
2351
2353 return (LRESULT)WindowFromPoint (*((LPPOINT)lParam));
2354
2355 case WM_CREATE:
2356 return TOOLTIPS_Create (hwnd);
2357
2358 case WM_DESTROY:
2359 return TOOLTIPS_Destroy (infoPtr);
2360
2361 case WM_ERASEBKGND:
2362 /* we draw the background in WM_PAINT */
2363 return 0;
2364
2365 case WM_GETFONT:
2366 return TOOLTIPS_GetFont (infoPtr);
2367
2368 case WM_GETTEXT:
2369 return TOOLTIPS_OnWMGetText (infoPtr, wParam, (LPWSTR)lParam);
2370
2371 case WM_GETTEXTLENGTH:
2372 return TOOLTIPS_GetTextLength (infoPtr);
2373
2374 case WM_LBUTTONDOWN:
2375 case WM_LBUTTONUP:
2376 case WM_MBUTTONDOWN:
2377 case WM_MBUTTONUP:
2378 case WM_RBUTTONDOWN:
2379 case WM_RBUTTONUP:
2380 case WM_MOUSEMOVE:
2381 return TOOLTIPS_MouseMessage (infoPtr);
2382
2383 case WM_NCCREATE:
2384 return TOOLTIPS_NCCreate (hwnd);
2385
2386 case WM_NCHITTEST:
2387 return TOOLTIPS_NCHitTest (infoPtr, wParam, lParam);
2388
2389 case WM_NOTIFYFORMAT:
2390 return TOOLTIPS_NotifyFormat (infoPtr, wParam, lParam);
2391
2392 case WM_PRINTCLIENT:
2393 case WM_PAINT:
2394 return TOOLTIPS_Paint (infoPtr, (HDC)wParam);
2395
2396 case WM_SETFONT:
2397 return TOOLTIPS_SetFont (infoPtr, (HFONT)wParam, LOWORD(lParam));
2398
2399 case WM_SYSCOLORCHANGE:
2401 return 0;
2402
2403 case WM_TIMER:
2404 return TOOLTIPS_Timer (infoPtr, (INT)wParam);
2405
2406 case WM_WININICHANGE:
2407 return TOOLTIPS_WinIniChange (infoPtr);
2408
2409 default:
2410 if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
2411 ERR("unknown msg %04x wp=%08lx lp=%08lx\n",
2412 uMsg, wParam, lParam);
2413 return DefWindowProcW (hwnd, uMsg, wParam, lParam);
2414 }
2415}
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
Definition: commctrl.c:1748
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
Definition: commctrl.c:1586
static LRESULT TOOLTIPS_SetTipBkColor(TOOLTIPS_INFO *infoPtr, COLORREF clrBk)
Definition: tooltips.c:1651
static LRESULT TOOLTIPS_Destroy(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1935
static LRESULT TOOLTIPS_GetCurrentToolT(const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1335
static LRESULT TOOLTIPS_UpdateTipTextT(TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1843
static LRESULT TOOLTIPS_DelToolT(TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1217
static LRESULT TOOLTIPS_Update(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1833
static LRESULT TOOLTIPS_GetToolCount(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1441
static LRESULT TOOLTIPS_SetTipTextColor(TOOLTIPS_INFO *infoPtr, COLORREF clrText)
Definition: tooltips.c:1660
static LRESULT TOOLTIPS_AddToolT(TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1115
static LRESULT TOOLTIPS_WinIniChange(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:2195
static LRESULT TOOLTIPS_Activate(TOOLTIPS_INFO *infoPtr, BOOL activate)
Definition: tooltips.c:1101
static LRESULT TOOLTIPS_GetToolInfoT(const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1448
static LRESULT TOOLTIPS_NotifyFormat(TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
Definition: tooltips.c:2034
static LRESULT TOOLTIPS_GetTextT(const TOOLTIPS_INFO *infoPtr, TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1390
static LRESULT TOOLTIPS_TrackPosition(TOOLTIPS_INFO *infoPtr, LPARAM coord)
Definition: tooltips.c:1816
static LRESULT TOOLTIPS_GetTipTextColor(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1434
static LRESULT TOOLTIPS_GetTipBkColor(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1427
static LRESULT TOOLTIPS_OnWMGetText(const TOOLTIPS_INFO *infoPtr, WPARAM size, LPWSTR pszText)
Definition: tooltips.c:2132
static LRESULT TOOLTIPS_GetTextLength(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:2115
static LRESULT TOOLTIPS_Pop(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1518
static LRESULT TOOLTIPS_Paint(const TOOLTIPS_INFO *infoPtr, HDC hDC)
Definition: tooltips.c:2072
static LRESULT TOOLTIPS_SetToolInfoT(TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1713
static LRESULT TOOLTIPS_NewToolRectT(TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti)
Definition: tooltips.c:1497
static LRESULT TOOLTIPS_GetFont(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1978
static LRESULT TOOLTIPS_SetFont(TOOLTIPS_INFO *infoPtr, HFONT hFont, BOOL redraw)
Definition: tooltips.c:2086
static LRESULT TOOLTIPS_Timer(TOOLTIPS_INFO *infoPtr, INT iTimer)
Definition: tooltips.c:2146
static LRESULT TOOLTIPS_GetMargin(const TOOLTIPS_INFO *infoPtr, RECT *rect)
Definition: tooltips.c:1373
static LRESULT TOOLTIPS_NCHitTest(const TOOLTIPS_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
Definition: tooltips.c:2016
static LRESULT TOOLTIPS_SetMaxTipWidth(TOOLTIPS_INFO *infoPtr, INT MaxWidth)
Definition: tooltips.c:1640
static LRESULT TOOLTIPS_HitTestT(const TOOLTIPS_INFO *infoPtr, LPTTHITTESTINFOW lptthit, BOOL isW)
Definition: tooltips.c:1474
static LRESULT TOOLTIPS_GetDelayTime(const TOOLTIPS_INFO *infoPtr, DWORD duration)
Definition: tooltips.c:1350
static LRESULT TOOLTIPS_EnumToolsT(const TOOLTIPS_INFO *infoPtr, UINT uIndex, TTTOOLINFOW *ti, BOOL isW)
Definition: tooltips.c:1297
static LRESULT TOOLTIPS_SetMargin(TOOLTIPS_INFO *infoPtr, const RECT *rect)
Definition: tooltips.c:1630
static LRESULT TOOLTIPS_MouseMessage(TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1985
static LRESULT TOOLTIPS_GetBubbleSize(const TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *lpToolInfo)
Definition: tooltips.c:1313
static LRESULT TOOLTIPS_NCCreate(HWND hwnd)
Definition: tooltips.c:1994
static LRESULT TOOLTIPS_GetMaxTipWidth(const TOOLTIPS_INFO *infoPtr)
Definition: tooltips.c:1383
static LRESULT TOOLTIPS_Create(HWND hwnd)
Definition: tooltips.c:1905
static LRESULT TOOLTIPS_TrackActivate(TOOLTIPS_INFO *infoPtr, BOOL track_activate, const TTTOOLINFOA *ti)
Definition: tooltips.c:1785
static LRESULT TOOLTIPS_SetTitleT(TOOLTIPS_INFO *infoPtr, UINT_PTR uTitleIcon, LPCWSTR pszTitle, BOOL isW)
Definition: tooltips.c:1669
#define WM_APP
Definition: eventvwr.h:73
#define TTM_SETDELAYTIME
Definition: commctrl.h:1785
#define TTM_NEWTOOLRECTA
Definition: commctrl.h:1790
#define TTM_ACTIVATE
Definition: commctrl.h:1784
#define TTM_GETMAXTIPWIDTH
Definition: commctrl.h:1820
#define TTM_SETTOOLINFOA
Definition: commctrl.h:1797
#define TTM_GETCURRENTTOOLW
Definition: commctrl.h:1810
#define TTM_GETTIPTEXTCOLOR
Definition: commctrl.h:1818
#define TTM_RELAYEVENT
Definition: commctrl.h:1792
#define TTM_DELTOOLA
Definition: commctrl.h:1788
#define LPTOOLINFOW
Definition: commctrl.h:1713
#define TTM_DELTOOLW
Definition: commctrl.h:1789
#define TTM_GETMARGIN
Definition: commctrl.h:1822
#define TTM_GETTOOLINFOA
Definition: commctrl.h:1794
#define TTM_GETTEXTW
Definition: commctrl.h:1803
#define TTM_GETDELAYTIME
Definition: commctrl.h:1816
#define TTM_POP
Definition: commctrl.h:1823
#define TTM_ADDTOOLA
Definition: commctrl.h:1786
#define TTM_ENUMTOOLSA
Definition: commctrl.h:1807
#define TTM_NEWTOOLRECTW
Definition: commctrl.h:1791
#define TTM_SETTITLEW
Definition: commctrl.h:1828
#define TTM_ENUMTOOLSW
Definition: commctrl.h:1808
#define TTM_TRACKPOSITION
Definition: commctrl.h:1813
#define TTM_UPDATE
Definition: commctrl.h:1824
#define TTM_GETTOOLCOUNT
Definition: commctrl.h:1806
#define TTM_ADDTOOLW
Definition: commctrl.h:1787
#define TTM_UPDATETIPTEXTA
Definition: commctrl.h:1804
#define TTM_GETCURRENTTOOLA
Definition: commctrl.h:1809
#define TTM_GETTIPBKCOLOR
Definition: commctrl.h:1817
#define TTM_SETMARGIN
Definition: commctrl.h:1821
#define TTM_UPDATETIPTEXTW
Definition: commctrl.h:1805
#define TTM_SETTIPBKCOLOR
Definition: commctrl.h:1814
#define TTM_SETTOOLINFOW
Definition: commctrl.h:1798
#define TTM_SETTITLEA
Definition: commctrl.h:1827
#define TTM_SETTIPTEXTCOLOR
Definition: commctrl.h:1815
#define TTM_HITTESTA
Definition: commctrl.h:1800
#define TTM_TRACKACTIVATE
Definition: commctrl.h:1812
#define TTM_GETTOOLINFOW
Definition: commctrl.h:1795
#define TTM_GETBUBBLESIZE
Definition: commctrl.h:1825
#define TTM_GETTEXTA
Definition: commctrl.h:1802
#define TTM_SETMAXTIPWIDTH
Definition: commctrl.h:1819
#define TTM_HITTESTW
Definition: commctrl.h:1801
#define WM_PRINTCLIENT
Definition: richedit.h:70
DWORD COLORREF
Definition: windef.h:300
#define WM_PAINT
Definition: winuser.h:1620
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define WM_GETTEXTLENGTH
Definition: winuser.h:1619
#define WM_CREATE
Definition: winuser.h:1608
#define WM_WININICHANGE
Definition: winuser.h:1630
#define WM_GETTEXT
Definition: winuser.h:1618
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1626
#define WM_GETFONT
Definition: winuser.h:1651
#define WM_NCCREATE
Definition: winuser.h:1683
#define WM_SETFONT
Definition: winuser.h:1650
#define WM_TIMER
Definition: winuser.h:1742
HWND WINAPI WindowFromPoint(_In_ POINT)
#define WM_USER
Definition: winuser.h:1895
#define WM_DESTROY
Definition: winuser.h:1609

Referenced by TOOLTIPS_Register().

◆ TOOLTIPS_WinIniChange()

static LRESULT TOOLTIPS_WinIniChange ( TOOLTIPS_INFO infoPtr)
static

Definition at line 2195 of file tooltips.c.

2196{
2198
2199 return 0;
2200}

Referenced by TOOLTIPS_WindowProc().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( tooltips  )

Variable Documentation

◆ hTooltipIcons

HICON hTooltipIcons[TTI_ERROR+1]
static