[ros-diffs] [weiden] 30659: - Support DT_PREFIXONLY and DT_HIDEPREFIX in DrawTextEx - Support DSS_PREFIXONLY and DSS_HIDEPREFIX in DrawState

weiden at svn.reactos.org weiden at svn.reactos.org
Thu Nov 22 01:40:25 CET 2007


Author: weiden
Date: Thu Nov 22 03:40:24 2007
New Revision: 30659

URL: http://svn.reactos.org/svn/reactos?rev=30659&view=rev
Log:
- Support DT_PREFIXONLY and DT_HIDEPREFIX in DrawTextEx
- Support DSS_PREFIXONLY and DSS_HIDEPREFIX in DrawState

Modified:
    trunk/reactos/dll/win32/user32/windows/draw.c
    trunk/reactos/dll/win32/user32/windows/font.c

Modified: trunk/reactos/dll/win32/user32/windows/draw.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/draw.c?rev=30659&r1=30658&r2=30659&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/draw.c (original)
+++ trunk/reactos/dll/win32/user32/windows/draw.c Thu Nov 22 03:40:24 2007
@@ -1581,9 +1581,16 @@
         dtflags |= DT_RIGHT;
     if(opcode == DST_TEXT)
         dtflags |= DT_NOPREFIX;
+    else if(opcode == DST_PREFIXTEXT)
+    {
+        if (flags & DSS_HIDEPREFIX)
+            dtflags |= DT_HIDEPREFIX;
+        if (flags & DSS_PREFIXONLY)
+            dtflags |= DT_PREFIXONLY;
+    }
 
     /* For DSS_NORMAL we just jam in the image and return */
-    if((flags & 0x7ff0) == DSS_NORMAL)
+    if((flags & 0x79f0) == DSS_NORMAL)
     {
         return PAINTING_DrawStateJam(hdc, opcode, func, lp, len, &rc, dtflags, unicode);
     }

Modified: trunk/reactos/dll/win32/user32/windows/font.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/font.c?rev=30659&r1=30658&r2=30659&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/font.c (original)
+++ trunk/reactos/dll/win32/user32/windows/font.c Thu Nov 22 03:40:24 2007
@@ -1158,11 +1158,12 @@
                 else
                     len_seg = len;
 
-                if (!ExtTextOutW( hdc, xseg, y,
+                if (!(flags & DT_PREFIXONLY)&&
+                    !ExtTextOutW( hdc, xseg, y,
                                  ((flags & DT_NOCLIP) ? 0 : ETO_CLIPPED) |
                                  ((flags & DT_RTLREADING) ? ETO_RTLREADING : 0),
                                  rect, str, len_seg, NULL ))  return 0;
-                if (prefix_offset != -1 && prefix_offset < len_seg)
+                if (prefix_offset != -1 && prefix_offset < len_seg && !(flags & DT_HIDEPREFIX))
                 {
                     TEXT_DrawUnderscore (hdc, xseg, y + tm.tmAscent + 2, str, prefix_offset, (flags & DT_NOCLIP) ? NULL : rect);
                 }




More information about the Ros-diffs mailing list