diff --git a/reactos/dll/win32/user32/windows/draw.c b/reactos/dll/win32/user32/windows/draw.c index c3ac41db56a..388ec83a695 100644 --- a/reactos/dll/win32/user32/windows/draw.c +++ b/reactos/dll/win32/user32/windows/draw.c @@ -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); } diff --git a/reactos/dll/win32/user32/windows/font.c b/reactos/dll/win32/user32/windows/font.c index 288833d0b22..41dbc0711fd 100644 --- a/reactos/dll/win32/user32/windows/font.c +++ b/reactos/dll/win32/user32/windows/font.c @@ -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); }