From f9e280aab37c7182d9c551a0a9616264c551416d Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Wed, 10 May 2000 21:42:53 +0000 Subject: [PATCH] Restore accidentally undone changes. --- dlls/comctl32/tab.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index a72d443bf5e..7e20ed2599f 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -601,6 +601,10 @@ static void TAB_SetupScrolling( */ if (infoPtr->hwndUpDown==0) { + /* + * I use a scrollbar since it seems to be more stable than the Updown + * control. + */ infoPtr->hwndUpDown = CreateWindowA("msctls_updown32", "", WS_VISIBLE | WS_CHILD | UDS_HORZ, @@ -816,6 +820,10 @@ static void TAB_SetItemBounds (HWND hwnd) infoPtr->needsScrolling = (curItemLeftPos + (2*SELECTED_TAB_OFFSET) > clientRect.right); + /* Don't need scrolling, then update infoPtr->leftmostVisible */ + if(!infoPtr->needsScrolling) + infoPtr->leftmostVisible = 0; + TAB_SetupScrolling(hwnd, infoPtr, &clientRect); } @@ -1314,8 +1322,8 @@ static void TAB_Refresh (HWND hwnd, HDC hdc) * If we haven't set the current focus yet, set it now. * Only happens when we first paint the tab controls. */ - if (infoPtr->uFocus == -1) - TAB_SetCurFocus(hwnd, infoPtr->iSelected); + if (infoPtr->uFocus == -1) + TAB_SetCurFocus(hwnd, infoPtr->iSelected); } SelectObject (hdc, hOldFont); @@ -1555,12 +1563,12 @@ TAB_InsertItem (HWND hwnd, WPARAM wParam, LPARAM lParam) if (pti->mask & TCIF_PARAM) infoPtr->items[iItem].lParam = pti->lParam; + TAB_SetItemBounds(hwnd); TAB_InvalidateTabArea(hwnd, infoPtr); TRACE("[%04x]: added item %d '%s'\n", hwnd, iItem, infoPtr->items[iItem].pszText); - TAB_SetItemBounds(hwnd); return iItem; } @@ -2111,7 +2119,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) default: if (uMsg >= WM_USER) - ERR("unknown msg %04x wp=%08x lp=%08lx\n", + WARN("unknown msg %04x wp=%08x lp=%08lx\n", uMsg, wParam, lParam); return DefWindowProcA (hwnd, uMsg, wParam, lParam); } -- 2.11.4.GIT