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/d…
==============================================================================
--- 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/f…
==============================================================================
--- 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);
}