Module: wine Branch: master Commit: c14ff4bef0bd87000fea08eb69d29ddc6d874f5f URL: http://source.winehq.org/git/wine.git/?a=commit;h=c14ff4bef0bd87000fea08eb69...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Tue Jun 18 16:34:27 2013 +0900
comctl32: Fix broken logic for retrieving default font properties.
---
dlls/comctl32/tab.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c index bd75c88..85467ba 100644 --- a/dlls/comctl32/tab.c +++ b/dlls/comctl32/tab.c @@ -1899,7 +1899,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect if(infoPtr->dwStyle & TCS_VERTICAL) /* if we are vertical rotate the text and each character */ { LOGFONTW logfont; - HFONT hFont = 0; + HFONT hFont; INT nEscapement = 900; INT nOrientation = 900;
@@ -1911,10 +1911,8 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
/* to get a font with the escapement and orientation we are looking for, we need to */ /* call CreateFontIndirect, which requires us to set the values of the logfont we pass in */ - if (!GetObjectW((infoPtr->hFont) ? - infoPtr->hFont : GetStockObject(DEFAULT_GUI_FONT), - sizeof(LOGFONTW),&logfont)) - GetStockObject(DEFAULT_GUI_FONT); + if (!GetObjectW(infoPtr->hFont, sizeof(logfont), &logfont)) + GetObjectW(GetStockObject(DEFAULT_GUI_FONT), sizeof(logfont), &logfont);
logfont.lfEscapement = nEscapement; logfont.lfOrientation = nOrientation;