Inspect style bits independently on style change.

This commit is contained in:
Dimitrie O. Paun 2002-10-19 00:19:28 +00:00 committed by Alexandre Julliard
parent b50692ee82
commit a2dd8ecc33
1 changed files with 12 additions and 8 deletions

View File

@ -8182,18 +8182,22 @@ static INT LISTVIEW_StyleChanged(LISTVIEW_INFO *infoPtr, WPARAM wStyleType,
hl.pwpos = ℘
Header_Layout(infoPtr->hwndHeader, &hl);
SetWindowPos(infoPtr->hwndHeader, infoPtr->hwndSelf, wp.x, wp.y, wp.cx, wp.cy, wp.flags);
if (!(LVS_NOCOLUMNHEADER & lpss->styleNew))
ShowWindow(infoPtr->hwndHeader, SW_SHOWNORMAL);
}
infoPtr->nItemWidth = LISTVIEW_CalculateMaxWidth(infoPtr);
infoPtr->nItemHeight = LISTVIEW_CalculateMaxHeight(infoPtr);
if (uNewView == LVS_ICON || uNewView == LVS_SMALLICON)
{
if (lpss->styleNew & LVS_ALIGNLEFT) LISTVIEW_AlignLeft(infoPtr);
else LISTVIEW_AlignTop(infoPtr);
}
}
if (uNewView == LVS_REPORT)
ShowWindow(infoPtr->hwndHeader, (LVS_NOCOLUMNHEADER & lpss->styleNew) ? SW_HIDE : SW_SHOWNORMAL);
if ( (uNewView == LVS_ICON || uNewView == LVS_SMALLICON) &&
(uNewView != uOldView || ((lpss->styleNew ^ lpss->styleOld) & LVS_ALIGNMASK)) )
{
if (infoPtr->dwStyle & LVS_ALIGNLEFT)
LISTVIEW_AlignLeft(infoPtr);
else
LISTVIEW_AlignTop(infoPtr);
}
/* update the size of the client area */