From b0861921b2a4e0c72ad7389b181910f9b4b4e935 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 19 Nov 2009 14:46:23 +0300 Subject: [PATCH] comctl32/listview: Compare item text on insert depending on A/W message. --- dlls/comctl32/listview.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index ae658bd623c..d59a984fa23 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -7395,7 +7395,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, hItem = DPA_GetPtr( infoPtr->hdpaItems, i); item_s = (ITEM_INFO*)DPA_GetPtr(hItem, 0); - cmpv = textcmpWT(item_s->hdr.pszText, lpLVItem->pszText, TRUE); + cmpv = textcmpWT(item_s->hdr.pszText, lpLVItem->pszText, isW); if (infoPtr->dwStyle & LVS_SORTDESCENDING) cmpv *= -1; if (cmpv >= 0) break; @@ -10986,10 +10986,8 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) /* case LVM_INSERTGROUPSORTED: */ case LVM_INSERTITEMA: - return LISTVIEW_InsertItemT(infoPtr, (LPLVITEMW)lParam, FALSE); - case LVM_INSERTITEMW: - return LISTVIEW_InsertItemT(infoPtr, (LPLVITEMW)lParam, TRUE); + return LISTVIEW_InsertItemT(infoPtr, (LPLVITEMW)lParam, uMsg == LVM_INSERTITEMW); /* case LVM_INSERTMARKHITTEST: */ -- 2.11.4.GIT