comctl32/listview: Fix overwriting of item values.

This commit is contained in:
Daniel Jelinski 2013-03-09 06:52:53 +01:00 committed by Alexandre Julliard
parent 8f6497c782
commit 6ad51d509c
1 changed files with 1 additions and 1 deletions

View File

@ -8290,10 +8290,10 @@ static BOOL LISTVIEW_SetColumnWidth(LISTVIEW_INFO *infoPtr, INT nColumn, INT cx)
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 0;
lvItem.iSubItem = nColumn;
lvItem.pszText = szDispText;
lvItem.cchTextMax = DISP_TEXT_SIZE;
for (; lvItem.iItem < infoPtr->nItemCount; lvItem.iItem++)
{
lvItem.pszText = szDispText;
if (!LISTVIEW_GetItemW(infoPtr, &lvItem)) continue;
nLabelWidth = LISTVIEW_GetStringWidthT(infoPtr, lvItem.pszText, TRUE);
if (max_cx < nLabelWidth) max_cx = nLabelWidth;