Here is an implementation of SetItemW for treeview. -aric
Index: dlls/comctl32/treeview.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v retrieving revision 1.96 diff -u -u -r1.96 treeview.c --- dlls/comctl32/treeview.c 2002/02/01 19:54:10 1.96 +++ dlls/comctl32/treeview.c 2002/02/01 20:26:08 @@ -1988,6 +1988,40 @@ } static LRESULT +TREEVIEW_SetItemW(TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem) +{ + TVITEMEXA tvItemA; + INT len; + LRESULT rc; + + tvItemA.mask = tvItem->mask; + tvItemA.hItem = tvItem->hItem; + tvItemA.state = tvItem->state; + tvItemA.stateMask = tvItem->stateMask; + len = WideCharToMultiByte(CP_ACP, 0, tvItem->pszText, -1, + NULL ,0 , NULL,NULL); + if (len) + { + len ++; + tvItemA.pszText = HeapAlloc(GetProcessHeap(),0,len); + len = WideCharToMultiByte(CP_ACP, 0, tvItem->pszText, -1, + tvItemA.pszText ,len , NULL,NULL); + } + else + tvItemA.pszText = NULL; + tvItemA.cchTextMax = tvItem->cchTextMax; + tvItemA.iImage = tvItem->iImage; + tvItemA.iSelectedImage = tvItem->iSelectedImage; + tvItemA.cChildren = tvItem->cChildren; + tvItemA.lParam = tvItem->lParam; + tvItemA.iIntegral = tvItem->iIntegral; + + rc = TREEVIEW_SetItemA(infoPtr,&tvItemA); + HeapFree(GetProcessHeap(),0,tvItemA.pszText); + return rc; +} + +static LRESULT TREEVIEW_GetItemState(TREEVIEW_INFO *infoPtr, HTREEITEM wineItem, UINT mask) { TRACE("\n"); @@ -5043,7 +5084,7 @@ return TREEVIEW_SetItemA(infoPtr, (LPTVITEMEXA)lParam); case TVM_SETITEMW: - FIXME("Unimplemented msg TVM_SETITEMW\n"); + return TREEVIEW_SetItemW(infoPtr, (LPTVITEMEXW)lParam); return 0; case TVM_SETLINECOLOR: