Modify

#1513 closed Bug (Fixed)

_GUIToolTip_AddTool() accepts only strings in $sText parameter

Reported by: doudou Owned by: Jpm
Milestone: 3.3.7.0 Component: Standard UDFs
Version: 3.3.4.0 Severity: None
Keywords: gui, tooltip Cc:

Description

With the standard UDF GuiToolTip.au3 it is impossible to create a dynamic tool tip control sending TTN_GETDISPINFO callback.

If you want to set text or other properties of a tool tip in TTN_GETDISPINFO notification callback you have to specify LPSTR_TEXTCALLBACK, which is a long integer of value -1, as text value in the original TOOLINFO while sending TTM_ADDTOOL message (here is the MSDN article: http://msdn.microsoft.com/en-us/library/bb760256(VS.85).aspx). _GUIToolTip_AddTool() however prohibits supplying anything but strings in the $sText argument, as it internally always converts the value into a character array pointer.

Suggested fix: check the type of $sText with IsString() or IsInt() before setting up TOOLINFO structure.

Attachments (0)

Change History (6)

comment:1 by doudou, on Mar 21, 2010 at 7:37:25 PM

This bug persists through AutoIt ver. 3.3.6.0

comment:2 by Valik, on Mar 21, 2010 at 8:20:01 PM

If a ticket is still open there's no point telling us the problem still exists.

in reply to:  2 comment:3 by doudou, on Mar 22, 2010 at 12:04:45 AM

Replying to Valik:

If a ticket is still open there's no point telling us the problem still exists.

I would never do that if a ticket is assigned (or confirmed). Otherwise it is possible that no one yet had time to investigate the problem and any additional information (as concerning new software release after the ticket creation) might be helpful - at least I thought so.
(I know, it isn't a forum, so no reply is expected)

comment:4 by doudou, on Apr 26, 2010 at 12:52:53 AM

There are similar bugs in other Common Controls UDFs.
While _GUICtrlComboBoxEx_InsertString() and _GUICtrlListView_InsertItem() handle LPSTR_TEXTCALLBACK situation correctly, _GUICtrlComboBoxEx_SetItem(), _GUICtrlListView_SetItem() and _GUICtrlTreeView_InsertItem() blindly assume $sText parameter to be a string and block thereby possibility to receive *_GETDISPINFO notifications.

comment:5 by Jpm, on May 16, 2010 at 7:43:49 AM

Owner: changed from Gary to Jpm
Status: newassigned

If understand well,you may have forgot _GUICtrlHeader_InsertItem() and _GUICtrlHeader_SetItemText().
May I have an working example for _GUIToolTip_AddTool() so I can verify the modifications?

Thanks

comment:6 by Jpm, on May 16, 2010 at 4:32:35 PM

Milestone: 3.3.7.0
Resolution: Fixed
Status: assignedclosed

Fixed by revision [5822] in version: 3.3.7.0

Modify Ticket

Action
as closed The owner will remain Jpm.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.