mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 05:26:58 +00:00
[EXPLORER] Workaround for something that may or may not be an "unintended feature" of the comctl toolbar.
Apparently the indices provided in NMTBGETINFOTIP (TBN_GETINFOTIP data struct), are not reliable, but since the lParam values are, and it saves us a lookup, we will be using those instead. Win-Win!
This commit is contained in:
parent
bc43733e48
commit
5ec441a867
|
@ -853,14 +853,17 @@ public:
|
|||
}
|
||||
|
||||
|
||||
VOID GetTooltipText(int index, LPTSTR szTip, DWORD cchTip)
|
||||
VOID GetTooltipText(LPARAM data, LPTSTR szTip, DWORD cchTip)
|
||||
{
|
||||
InternalIconData * notifyItem = GetItemData(index);
|
||||
|
||||
InternalIconData * notifyItem = reinterpret_cast<InternalIconData *>(data);
|
||||
if (notifyItem)
|
||||
{
|
||||
StringCchCopy(szTip, cchTip, notifyItem->szTip);
|
||||
}
|
||||
else
|
||||
{
|
||||
StringCchCopy(szTip, cchTip, L"");
|
||||
}
|
||||
}
|
||||
|
||||
VOID ResizeImagelist()
|
||||
|
@ -1240,7 +1243,7 @@ public:
|
|||
LRESULT OnGetInfoTip(INT uCode, LPNMHDR hdr, BOOL& bHandled)
|
||||
{
|
||||
NMTBGETINFOTIPW * nmtip = (NMTBGETINFOTIPW *) hdr;
|
||||
Toolbar.GetTooltipText(nmtip->iItem, nmtip->pszText, nmtip->cchTextMax);
|
||||
Toolbar.GetTooltipText(nmtip->lParam, nmtip->pszText, nmtip->cchTextMax);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue