Hi.
Trying without success to show tooltips for a tabcontrol, I found the following problems in the source code. Notice, that my skills in C++ are poor, so it is very possible the following is a false alarm.
I am quote https://github.com/wine-mirror/wine/blob/master/dlls/comctl32/tab.c (hope it is the proper source code)
This seems to be a bug: WM_LBUTTONDOWN is relayed in the WM_MOUSEMOVE handler. But WM_LBUTTONDOWN will always hide the tooltip. WM_MOUSEMOVE instead will set the timer for showing the tooltip.
static LRESULT TAB_MouseMove (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { int redrawLeave; int redrawEnter;
if (infoPtr->hwndToolTip) TAB_RelayEvent (infoPtr->hwndToolTip, infoPtr->hwnd, WM_LBUTTONDOWN, wParam, lParam);
/* Determine which tab to highlight. Redraw tabs which change highlight ** status. */ TAB_RecalcHotTrack(infoPtr, &lParam, &redrawLeave, &redrawEnter);
hottrack_refresh (infoPtr, redrawLeave); hottrack_refresh (infoPtr, redrawEnter);
return 0; }
The WM_LBUTTONDOWN is relayed twice? Why? It is not exactly a bug, but sub-optimal.
static LRESULT TAB_LButtonDown (TAB_INFO *infoPtr, WPARAM wParam, LPARAM lParam) { POINT pt; INT newItem; UINT dummy;
if (infoPtr->hwndToolTip) TAB_RelayEvent (infoPtr->hwndToolTip, infoPtr->hwnd, WM_LBUTTONDOWN, wParam, lParam);
if (!(infoPtr->dwStyle & TCS_FOCUSNEVER)) { SetFocus (infoPtr->hwnd); }
if (infoPtr->hwndToolTip) TAB_RelayEvent (infoPtr->hwndToolTip, infoPtr->hwnd, WM_LBUTTONDOWN, wParam, lParam);