Does anyone know how to make tooltips for a toolbar that has been assigned to a band in a rebar?
I tried using what I usually use for toolbars (below) and it doesn't work.
CONTROLCMD main,998,@TBSETTIP,MN_WINDOW,"Create a new window"
Larry
Larry, try subclassing the rebar control, detect WM_NOTIFY message, check if *<NMHDR>lParam.code is TTN_GETDISPINFO{A|W}. If so, forward this message to your main window.
sub RebarSubclassProc(hwnd, msg, wParam, lParam),int /*fixme*/
if (msg = WM_NOTIFY) /* & *<NMHDR>lParam.idFrom = toolbar_id */
if ((*<NMHDR>lParam.code = TTN_GETDISPINFOA) | (*<NMHDR>lParam.code = TTN_GETDISPINFOW))
return _SendMessage(GetParent(hwnd), WM_NOTIFY, wParam, lParam)
endif
endif
return CallWindowProc(...)
// added missing endif
Thanks Sapero, I'll give it a try.
Larry
Your help above worked great Sapero.
There's one little catch that has to be remembered.
You have to add the tooltip's text to the toolbar BEFORE you add the toolbar to the rebarband.
If you try to add tips to a toolbar after the toolbar is added to a rebar band then you get no tooltips.
Larry