Skip to content
Snippets Groups Projects
Commit f9e280aa authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard
Browse files

Restore accidentally undone changes.

parent f7a51e1e
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment