LPSTR_TEXTCALLBACK wouldn't work if the application supplied the item

text in its own buffer.
This commit is contained in:
Niclas Karlsson MATE 2000-08-14 17:17:57 +00:00 committed by Alexandre Julliard
parent e101f6db3b
commit 0f9d56fde8
1 changed files with 5 additions and 1 deletions

View File

@ -4796,7 +4796,11 @@ static LRESULT LISTVIEW_GetItemA(HWND hwnd, LPLVITEMA lpLVItem, BOOL internal)
{
Str_SetPtrA(ppszText, dispInfo.item.pszText);
}
/* Here lpLVItem->pszText==dispInfo.item.pszText so a copy is unnecessary */
/* If lpLVItem->pszText==dispInfo.item.pszText a copy is unnecessary, but */
/* some apps give a new pointer in ListView_Notify so we can't be sure. */
if (lpLVItem->pszText!=dispInfo.item.pszText) {
lstrcpynA(lpLVItem->pszText, dispInfo.item.pszText, lpLVItem->cchTextMax);
}
}
else if (lpLVItem->mask & LVIF_TEXT)
{