diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c index 764a127f78..370723bd88 100644 --- a/dll/win32/comctl32/listview.c +++ b/dll/win32/comctl32/listview.c @@ -2046,6 +2046,12 @@ static INT LISTVIEW_UpdateHScroll(LISTVIEW_INFO *infoPtr) horzInfo.cbSize = sizeof(SCROLLINFO); horzInfo.nPage = infoPtr->rcList.right - infoPtr->rcList.left; +#ifdef __REACTOS__ + /* icon views should not have horizontal scroll bars. Fix for CORE-16466 */ + if (infoPtr->uView == LV_VIEW_ICON || infoPtr->uView == LV_VIEW_SMALLICON) + return 0; +#endif + /* for now, we'll set info.nMax to the _count_, and adjust it later */ if (infoPtr->uView == LV_VIEW_LIST) { @@ -2133,6 +2139,10 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr) vertInfo.fMask = SIF_RANGE | SIF_PAGE; vertInfo.nMax = max(vertInfo.nMax - 1, 0); +#ifdef __REACTOS__ + /* if there are no pages, then vertical scroll bars are not needed. Fix for CORE-16466 */ + vertInfo.nMax = ((vertInfo.nPage == 0) ? 0 : vertInfo.nMax); +#endif dy = GetScrollPos(infoPtr->hwndSelf, SB_VERT); dy -= SetScrollInfo(infoPtr->hwndSelf, SB_VERT, &vertInfo, TRUE); TRACE("vertInfo=%s\n", debugscrollinfo(&vertInfo));