Tooltips not showing in some hosts on Windows..

Tooltips didn’t work for me in any host on Windows.

2 changes required

(1) Use ti.cbSize = TTTOOLINFO_V1_SIZE instead of sizeof(TOOLINFO)
in Win32Frame::initTooltip(), showTooltip() and hideTooltip()

The versions just mean that they added first one struct member (lParam), then another (lpReserved)
VSTGUI doesn’t use either of those, so there’s no reason to define a later version than the most backwards compatible.


(2) in Win32Frame::showTooltip(), fix a setting:
SendMessage (tooltipWindow, TTM_SETMAXTIPWIDTH, 0, 0);

The last 0 is wrong, either use -1 to allow any width (and then the message should be sent in initTooltip() )
or set actual width in each call, ie
SendMessage (tooltipWindow, TTM_SETMAXTIPWIDTH, 0, (LPARAM)rc.right - rc.left);

Now tooltips work for me in latest Ableton, Bitwig, Renoise…


(3) also, feature request:
Win32Frame::showTooltip(rect, text), the line
SendMessage (tooltipWindow, TTM_SETDELAYTIME, 0, 2000);

should please take the delay time from a 3rd function argument that can be passed to CFrame.
2 secs is too long for me, I’m probably going to add a button to turn on/off help, then let the tips pop up quickly (2-400ms even).


Thanks,
/rasmus