Dustin, Adrian, can you please try this one, and let me know if it fixes your problems? ChangeLog Fix some treeview notification codes between ANSI/Unicode mode. Index: dlls/comctl32/treeview.c =================================================================== RCS file: /var/cvs/wine/dlls/comctl32/treeview.c,v retrieving revision 1.107 diff -u -r1.107 treeview.c --- dlls/comctl32/treeview.c 29 Oct 2002 21:25:35 -0000 1.107 +++ dlls/comctl32/treeview.c 30 Oct 2002 20:50:29 -0000 @@ -414,10 +414,21 @@ static INT get_notifycode(TREEVIEW_INFO *infoPtr, INT code) { - if (infoPtr->bNtfUnicode) { - if ( code >= (TVN_FIRST + TVN_LAST) / 2) code -= (TVN_FIRST - TVN_LAST) / 2; - } else { - if ( code < (TVN_FIRST + TVN_LAST) / 2) code += (TVN_FIRST - TVN_LAST) / 2; + if (!infoPtr->bNtfUnicode) { + switch (code) { + case TVN_SELCHANGINGW: return TVN_SELCHANGINGA; + case TVN_SELCHANGEDW: return TVN_SELCHANGEDA; + case TVN_GETDISPINFOW: return TVN_GETDISPINFOA; + case TVN_SETDISPINFOW: return TVN_SETDISPINFOA; + case TVN_ITEMEXPANDINGW: return TVN_ITEMEXPANDINGA; + case TVN_ITEMEXPANDEDW: return TVN_ITEMEXPANDEDA; + case TVN_BEGINDRAGW: return TVN_BEGINDRAGA; + case TVN_BEGINRDRAGW: return TVN_BEGINRDRAGA; + case TVN_DELETEITEMW: return TVN_DELETEITEMA; + case TVN_BEGINLABELEDITW: return TVN_BEGINLABELEDITA; + case TVN_ENDLABELEDITW: return TVN_ENDLABELEDITA; + case TVN_GETINFOTIPW: return TVN_GETINFOTIPA; + } } return code; } @@ -633,7 +644,7 @@ tvdi.hdr.hwndFrom = hwnd; tvdi.hdr.idFrom = GetWindowLongA(hwnd, GWL_ID); - tvdi.hdr.code = get_notifycode(infoPtr, TVN_BEGINLABELEDITA); + tvdi.hdr.code = get_notifycode(infoPtr, TVN_BEGINLABELEDITW); tvdi.item.mask = TVIF_HANDLE | TVIF_STATE | TVIF_PARAM | TVIF_TEXT; tvdi.item.hItem = editItem; @@ -677,8 +688,7 @@ callback.hdr.hwndFrom = hwnd; callback.hdr.idFrom = GetWindowLongA(hwnd, GWL_ID); - callback.hdr.code = (infoPtr->bNtfUnicode) ? TVN_GETDISPINFOW : - TVN_GETDISPINFOA; + callback.hdr.code = get_notifycode(infoPtr, TVN_GETDISPINFOW); /* 'state' always contains valid value, as well as 'lParam'. * All other parameters are uninitialized. @@ -1445,9 +1455,7 @@ { TRACE("%p, (%s)\n", wineItem, TREEVIEW_ItemName(wineItem)); - TREEVIEW_SendTreeviewNotify(infoPtr, - (infoPtr->bNtfUnicode) ? TVN_DELETEITEMW : - TVN_DELETEITEMA, + TREEVIEW_SendTreeviewNotify(infoPtr, TVN_DELETEITEMW, TVIF_HANDLE | TVIF_PARAM, 0, wineItem, 0); if (wineItem->firstChild) @@ -3059,10 +3067,7 @@ TREEVIEW_SendExpanding(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem, UINT action) { - return !TREEVIEW_SendTreeviewNotify(infoPtr, - (infoPtr->bNtfUnicode) ? TVN_ITEMEXPANDINGW : - TVN_ITEMEXPANDINGA, - action, + return !TREEVIEW_SendTreeviewNotify(infoPtr, TVN_ITEMEXPANDINGW, action, TVIF_HANDLE | TVIF_STATE | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE, 0, wineItem); @@ -3072,10 +3077,7 @@ TREEVIEW_SendExpanded(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem, UINT action) { - TREEVIEW_SendTreeviewNotify(infoPtr, - (infoPtr->bNtfUnicode) ? TVN_ITEMEXPANDEDW : - TVN_ITEMEXPANDEDA, - action, + TREEVIEW_SendTreeviewNotify(infoPtr, TVN_ITEMEXPANDEDW, action, TVIF_HANDLE | TVIF_STATE | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE, 0, wineItem); @@ -3638,7 +3640,7 @@ tvdi.hdr.hwndFrom = hwnd; tvdi.hdr.idFrom = GetWindowLongA(hwnd, GWL_ID); - tvdi.hdr.code = get_notifycode(infoPtr, TVN_ENDLABELEDITA); + tvdi.hdr.code = get_notifycode(infoPtr, TVN_ENDLABELEDITW); tvdi.item.mask = 0; tvdi.item.hItem = editedItem; tvdi.item.state = editedItem->state; @@ -3884,8 +3886,7 @@ { /* if TREEVIEW_TrackMouse == 1 dragging occurred and the cursor left the dragged item's rectangle */ if (TREEVIEW_TrackMouse(infoPtr, ht.pt)) { - TREEVIEW_SendTreeviewDnDNotify(infoPtr, TVN_BEGINDRAGA, ht.hItem, - ht.pt); + TREEVIEW_SendTreeviewDnDNotify(infoPtr, TVN_BEGINDRAGW, ht.hItem, ht.pt); infoPtr->dropItem = ht.hItem; /* clean up focusedItem as we dragged and won't select this item */ @@ -4009,8 +4010,7 @@ { if (ht.hItem) { - TREEVIEW_SendTreeviewDnDNotify(infoPtr, TVN_BEGINRDRAGA, ht.hItem, - ht.pt); + TREEVIEW_SendTreeviewDnDNotify(infoPtr, TVN_BEGINRDRAGW, ht.hItem, ht.pt); infoPtr->dropItem = ht.hItem; } } @@ -4128,7 +4128,7 @@ return FALSE; if (TREEVIEW_SendTreeviewNotify(infoPtr, - TVN_SELCHANGINGA, + TVN_SELCHANGINGW, cause, TVIF_HANDLE | TVIF_STATE | TVIF_PARAM, prevSelect, @@ -4145,7 +4145,7 @@ TREEVIEW_EnsureVisible(infoPtr, infoPtr->selectedItem, FALSE); TREEVIEW_SendTreeviewNotify(infoPtr, - TVN_SELCHANGEDA, + TVN_SELCHANGEDW, cause, TVIF_HANDLE | TVIF_STATE | TVIF_PARAM, prevSelect, -- Dimi.