Opened 14 years ago

Closed 14 years ago

#1513 closed Bug (Fixed)

_GUIToolTip_AddTool() accepts only strings in $sText parameter

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


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: _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 Changed 14 years ago by doudou

This bug persists through AutoIt ver.

comment:2 follow-up: Changed 14 years ago by Valik

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

comment:3 in reply to: ↑ 2 Changed 14 years ago by doudou

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 Changed 14 years ago by doudou

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 Changed 14 years ago by Jpm

  • Owner changed from Gary to Jpm
  • Status changed from new to assigned

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?


comment:6 Changed 14 years ago by Jpm

  • Milestone set to
  • Resolution set to Fixed
  • Status changed from assigned to closed

Fixed by revision [5822] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.