user32: DrawText gets a 32bit flag, not a 16bit flag.

This commit is contained in:
Marcus Meissner 2011-05-05 16:12:49 +02:00 committed by Alexandre Julliard
parent cfe4c7fde9
commit 0ba1bfb062
1 changed files with 14 additions and 14 deletions

View File

@ -575,7 +575,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
RECT rc;
HBRUSH hBrush;
HFONT hFont, hOldFont = NULL;
WORD wFormat;
UINT format;
INT len, buf_size;
WCHAR *text;
@ -584,23 +584,23 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
switch (style & SS_TYPEMASK)
{
case SS_LEFT:
wFormat = DT_LEFT | DT_EXPANDTABS | DT_WORDBREAK;
format = DT_LEFT | DT_EXPANDTABS | DT_WORDBREAK;
break;
case SS_CENTER:
wFormat = DT_CENTER | DT_EXPANDTABS | DT_WORDBREAK;
format = DT_CENTER | DT_EXPANDTABS | DT_WORDBREAK;
break;
case SS_RIGHT:
wFormat = DT_RIGHT | DT_EXPANDTABS | DT_WORDBREAK;
format = DT_RIGHT | DT_EXPANDTABS | DT_WORDBREAK;
break;
case SS_SIMPLE:
wFormat = DT_LEFT | DT_SINGLELINE;
format = DT_LEFT | DT_SINGLELINE;
break;
case SS_LEFTNOWORDWRAP:
wFormat = DT_LEFT | DT_EXPANDTABS;
format = DT_LEFT | DT_EXPANDTABS;
break;
default:
@ -608,23 +608,23 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
}
if (GetWindowLongW( hwnd, GWL_EXSTYLE ) & WS_EX_RIGHT)
wFormat = DT_RIGHT | (wFormat & ~(DT_LEFT | DT_CENTER));
format = DT_RIGHT | (format & ~(DT_LEFT | DT_CENTER));
if (style & SS_NOPREFIX)
wFormat |= DT_NOPREFIX;
format |= DT_NOPREFIX;
if ((style & SS_TYPEMASK) != SS_SIMPLE)
{
if (style & SS_CENTERIMAGE)
wFormat |= DT_SINGLELINE | DT_VCENTER;
format |= DT_SINGLELINE | DT_VCENTER;
if (style & SS_EDITCONTROL)
wFormat |= DT_EDITCONTROL;
format |= DT_EDITCONTROL;
if (style & SS_ENDELLIPSIS)
wFormat |= DT_SINGLELINE | DT_END_ELLIPSIS;
format |= DT_SINGLELINE | DT_END_ELLIPSIS;
if (style & SS_PATHELLIPSIS)
wFormat |= DT_SINGLELINE | DT_PATH_ELLIPSIS;
format |= DT_SINGLELINE | DT_PATH_ELLIPSIS;
if (style & SS_WORDELLIPSIS)
wFormat |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
format |= DT_SINGLELINE | DT_WORD_ELLIPSIS;
}
if ((hFont = (HFONT)GetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET )))
@ -663,7 +663,7 @@ static void STATIC_PaintTextfn( HWND hwnd, HDC hdc, DWORD style )
}
else
{
DrawTextW( hdc, text, -1, &rc, wFormat );
DrawTextW( hdc, text, -1, &rc, format );
}
no_TextOut: