Problems with the tooltip controls.

Andrew Eikum aeikum at codeweavers.com
Mon Sep 19 14:01:21 CDT 2016


On Mon, Sep 19, 2016 at 09:56:59PM +0300, John Found wrote:
> On Mon, 19 Sep 2016 13:39:27 -0500
> Andrew Eikum <aeikum at codeweavers.com> wrote:
> 
> > On Mon, Sep 19, 2016 at 09:30:20PM +0300, John Found wrote:
> > > In my program I have window with several toolbars that have to show tooltips on its buttons.
> > > 
> > > As long as the tooltips are dynamical, I am handling the TTN_NEEDTEXTW following way:
> > > 
> > > 1. Send message TTM_GETCURRENTTOOLW to the tooltip control in NMHDR.hwndFrom reveived.
> > > 2. Determine from which toolbar the notification comes by using TOOLINFO.hwnd returned.
> > > 3. Generate the tooltip text and set the TOOLTIPTEXTW.lpszText to point to the generated text.
> > > 4. Return
> > > 
> > > This procedure works in Windows, but not in WINE. 
> > > In WINE, TTM_GETCURRENTTOOLW always returns FALSE. 
> > 
> > That message in Wine should only return FALSE in a few scenarios:
> > 
> > http://source.winehq.org/git/wine.git/blob/5a9f7ef06df15e26acf46b0210dd7697356da7ac:/dlls/comctl32/tooltips.c#l1271
> > 
> > Check that your cbSize member is valid, and if so, maybe look into why
> > Wine doesn't think there is a tool currently selected.
> > 
> > Andrew
> 
> What is the values of TTTOOLINFOW_V1_SIZE and TTTOOLINFOW_V2_SIZE? I tried to search for them, but there is some very 
> obfuscated C code... :'(
> 
> I am using a structure with size = 28h = 40 bytes
> 

Wrote a quick test and they seem to be 0x28 and 0x2c respectively, so
I guess that's not your problem.

Andrew



More information about the wine-devel mailing list