More docs compliant alignment handling for subitems.

This commit is contained in:
Dimitrie O. Paun 2002-10-21 19:31:01 +00:00 committed by Alexandre Julliard
parent 8ce90f2f0b
commit 88c26b9c01
1 changed files with 6 additions and 5 deletions

View File

@ -3385,11 +3385,12 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
{
COLUMN_INFO *lpColumnInfo = DPA_GetPtr(infoPtr->hdpaColumns, nSubItem);
if (lpColumnInfo)
{
if (lpColumnInfo->fmt & LVCFMT_LEFT) uFormat |= DT_LEFT;
else if (lpColumnInfo->fmt & LVCFMT_RIGHT) uFormat |= DT_RIGHT;
else if (lpColumnInfo->fmt & LVCFMT_CENTER) uFormat |= DT_CENTER;
}
switch (lpColumnInfo->fmt & LVCFMT_JUSTIFYMASK)
{
case LVCFMT_RIGHT: uFormat |= DT_RIGHT; break;
case LVCFMT_CENTER: uFormat |= DT_CENTER; break;
default: uFormat |= DT_LEFT;
}
}
if (!(uFormat & (DT_RIGHT | DT_CENTER))) rcLabel.left += 2;
DrawTextW(hdc, lvItem.pszText, -1, &rcLabel, uFormat);