From 5a64f285f2c3e1b2b493c005ac39b66b5f6a0d01 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Fri, 1 Feb 2002 19:54:10 +0000 Subject: [PATCH] Fix to GetItemW to stop whiping out the items text. --- dlls/comctl32/treeview.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 82d3fb734af..1be989ba008 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -1970,18 +1970,18 @@ TREEVIEW_GetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXA tvItem) if (tvItem->mask & TVIF_STATE) { tvItem->state = wineItem->state & tvItem->stateMask; } -#if 0 + if (tvItem->mask & TVIF_TEXT) { - if (wineItem->pszText == LPSTR_TEXTCALLBACKW) { - tvItem->pszText = LPSTR_TEXTCALLBACKW; /* FIXME:send notification? */ - ERR(" GetItem called with LPSTR_TEXTCALLBACK\n"); + if (wineItem->pszText == LPSTR_TEXTCALLBACKA) { + tvItem->pszText = LPSTR_TEXTCALLBACKA; + FIXME(" GetItem called with LPSTR_TEXTCALLBACK\n"); } else if (wineItem->pszText) { - lstrcpynAtoW(tvItem->pszText, wineItem->pszText, tvItem->cchTextMax); + MultiByteToWideChar(CP_ACP, 0, wineItem->pszText, + -1 , (LPWSTR)tvItem->pszText, tvItem->cchTextMax); } } -#endif - wineItem->pszText = NULL; + TRACE("item %d<%p>, txt %p, img %p, action %x\n", iItem, tvItem, tvItem->pszText, &tvItem->iImage, tvItem->mask); return TRUE;