mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00: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:
parent
682de0efb8
commit
c0a6ffd7ce
2 changed files with 11 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue