Opened 15 years ago
Closed 15 years ago
#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 Changed 15 years ago by doudou
comment:2 follow-up: ↓ 3 Changed 15 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 15 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 15 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 15 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?
Thanks
comment:6 Changed 15 years ago by Jpm
- Milestone set to 3.3.7.0
- Resolution set to Fixed
- Status changed from assigned to closed
Fixed by revision [5822] in version: 3.3.7.0
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.
This bug persists through AutoIt ver. 3.3.6.0