[PATCH] user32: DrawText gets a 32bit flag, not a 16bit flag
Marcus Meissner
meissner at suse.de
Thu May 5 09:12:49 CDT 2011
Hi,
CID1455.
I also decameled the wFormat variable, as it is wrong now.
Ciao, Marcus
---
dlls/user32/static.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/dlls/user32/static.c b/dlls/user32/static.c
index 99ce319..f4b5880 100644
--- a/dlls/user32/static.c
+++ b/dlls/user32/static.c
@@ -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:
--
1.7.1
More information about the wine-patches
mailing list