From ade0a5d8bd56c995f22cd61718c3ad5edef92784 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 17 May 2012 10:53:45 +0400 Subject: [PATCH] comctl32: When created with TCS_VERTICAL, TCS_MULTILINE is set automatically. (cherry picked from commit 21727c416fa4fafc5a7351e95ef4fe369445b9a3) --- dlls/comctl32/tab.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index f00ecd398e7..43d8cdf353c 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -3020,7 +3020,7 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam) TEXTMETRICW fontMetrics; HDC hdc; HFONT hOldFont; - DWORD dwStyle; + DWORD style; infoPtr = Alloc (sizeof(TAB_INFO)); @@ -3054,11 +3054,13 @@ static LRESULT TAB_Create (HWND hwnd, LPARAM lParam) /* The tab control always has the WS_CLIPSIBLINGS style. Even if you don't specify it in CreateWindow. This is necessary in order for paint to work correctly. This follows windows behaviour. */ - dwStyle = GetWindowLongW(hwnd, GWL_STYLE); - SetWindowLongW(hwnd, GWL_STYLE, dwStyle|WS_CLIPSIBLINGS); + style = GetWindowLongW(hwnd, GWL_STYLE); + if (style & TCS_VERTICAL) style |= TCS_MULTILINE; + style |= WS_CLIPSIBLINGS; + SetWindowLongW(hwnd, GWL_STYLE, style); - infoPtr->dwStyle = dwStyle | WS_CLIPSIBLINGS; - infoPtr->exStyle = (dwStyle & TCS_FLATBUTTONS) ? TCS_EX_FLATSEPARATORS : 0; + infoPtr->dwStyle = style; + infoPtr->exStyle = (style & TCS_FLATBUTTONS) ? TCS_EX_FLATSEPARATORS : 0; if (infoPtr->dwStyle & TCS_TOOLTIPS) { /* Create tooltip control */ -- 2.11.4.GIT