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

Alexandre Julliard julliard at winehq.org
Thu May 5 12:08:09 CDT 2011


Module: wine
Branch: master
Commit: 0ba1bfb0624d5e95f15499d6cfc9af1910c7c5be
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0ba1bfb0624d5e95f15499d6cfc9af1910c7c5be

Author: Marcus Meissner <meissner at suse.de>
Date:   Thu May  5 16:12:49 2011 +0200

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

---

 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:




More information about the wine-cvs mailing list