mirror of
https://github.com/reactos/reactos.git
synced 2026-07-07 09:40:21 +08:00
- Support DT_PREFIXONLY and DT_HIDEPREFIX in DrawTextEx
- Support DSS_PREFIXONLY and DSS_HIDEPREFIX in DrawState svn path=/trunk/; revision=30659
This commit is contained in:
@@ -1581,9 +1581,16 @@ IntDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC func, LPARAM lp, WPARAM wp,
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1158,11 +1158,12 @@ DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user