Modify

Opened 16 years ago

Closed 16 years ago

#1513 closed Bug (Fixed)

_GUIToolTip_AddTool() accepts only strings in $sText parameter

Reported by: doudou Owned by: J-Paul Mesnage
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, 16 years ago

This bug persists through AutoIt ver. 3.3.6.0

comment:2 by Valik, 16 years ago

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

in reply to:  2 comment:3 by doudou, 16 years ago

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, 16 years ago

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 J-Paul Mesnage, 16 years ago

Owner: changed from Gary to J-Paul Mesnage
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 J-Paul Mesnage, 16 years ago

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 J-Paul Mesnage.

Add Comment


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