Commit c14ff4be authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

comctl32: Fix broken logic for retrieving default font properties.

parent 924fad9d
...@@ -1899,7 +1899,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect ...@@ -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 */ if(infoPtr->dwStyle & TCS_VERTICAL) /* if we are vertical rotate the text and each character */
{ {
LOGFONTW logfont; LOGFONTW logfont;
HFONT hFont = 0; HFONT hFont;
INT nEscapement = 900; INT nEscapement = 900;
INT nOrientation = 900; INT nOrientation = 900;
...@@ -1911,10 +1911,8 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect ...@@ -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 */ /* 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 */ /* call CreateFontIndirect, which requires us to set the values of the logfont we pass in */
if (!GetObjectW((infoPtr->hFont) ? if (!GetObjectW(infoPtr->hFont, sizeof(logfont), &logfont))
infoPtr->hFont : GetStockObject(DEFAULT_GUI_FONT), GetObjectW(GetStockObject(DEFAULT_GUI_FONT), sizeof(logfont), &logfont);
sizeof(LOGFONTW),&logfont))
GetStockObject(DEFAULT_GUI_FONT);
logfont.lfEscapement = nEscapement; logfont.lfEscapement = nEscapement;
logfont.lfOrientation = nOrientation; logfont.lfOrientation = nOrientation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment