Use DrawText to display text in horizontal tabs.

oldstable
Gerard Patel 2000-12-12 00:35:20 +00:00 committed by Alexandre Julliard
parent 0c86432ea5
commit 4d975b328f
1 changed files with 23 additions and 10 deletions

View File

@ -1431,7 +1431,7 @@ TAB_DrawItemInterior
/* get the rectangle that the text fits in */ /* get the rectangle that the text fits in */
DrawTextW(hdc, infoPtr->items[iItem].pszText, -1, DrawTextW(hdc, infoPtr->items[iItem].pszText, -1,
&rcText, DT_CALCRECT); &rcText, DT_CALCRECT);
rcText.right += 4;
/* /*
* If not owner draw, then do the drawing ourselves. * If not owner draw, then do the drawing ourselves.
* *
@ -1536,15 +1536,28 @@ TAB_DrawItemInterior
hOldFont = SelectObject(hdc, hFont); hOldFont = SelectObject(hdc, hFont);
} }
ExtTextOutW(hdc, if (lStyle & TCS_VERTICAL)
((lStyle & TCS_VERTICAL) && (lStyle & TCS_BOTTOM)) ? drawRect->right : drawRect->left, {
((lStyle & TCS_VERTICAL) && !(lStyle & TCS_BOTTOM)) ? drawRect->bottom : drawRect->top, ExtTextOutW(hdc,
0, (lStyle & TCS_BOTTOM) ? drawRect->right : drawRect->left,
0, (!(lStyle & TCS_BOTTOM)) ? drawRect->bottom : drawRect->top,
infoPtr->items[iItem].pszText, 0,
lstrlenW(infoPtr->items[iItem].pszText), 0,
0); infoPtr->items[iItem].pszText,
lstrlenW(infoPtr->items[iItem].pszText),
0);
}
else
{
DrawTextW
(
hdc,
infoPtr->items[iItem].pszText,
lstrlenW(infoPtr->items[iItem].pszText),
drawRect,
uHorizAlign | DT_SINGLELINE
);
}
/* clean things up */ /* clean things up */
*drawRect = rcTemp; /* restore drawRect */ *drawRect = rcTemp; /* restore drawRect */