The return value of the member uiLengthDrawn of the parameter =
Dean Pan
dean at dnaml.com
Fri Oct 10 13:06:14 CDT 2008
PDRAWTEXTPARAMS of the function DrawTextExW should be the number of text =
processed.=0A=
=0A=
---=0A=
dlls/user32/text.c | 16 ++++++++++++++--=0A=
1 files changed, 14 insertions(+), 2 deletions(-)=0A=
=0A=
diff --git a/dlls/user32/text.c b/dlls/user32/text.c=0A=
index da3444d..1142b29 100644=0A=
--- a/dlls/user32/text.c=0A=
+++ b/dlls/user32/text.c=0A=
@@ -597,6 +597,7 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const =
WCHAR *str, int *count,=0A=
int num_fit;=0A=
int word_broken;=0A=
int line_fits;=0A=
+ int singleline_count =3D 0;=0A=
unsigned int j_in_seg;=0A=
int ellipsified;=0A=
*pprefix_offset =3D -1;=0A=
@@ -733,7 +734,10 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const =
WCHAR *str, int *count,=0A=
if ((format & DT_EXPANDTABS) && ellipsified)=0A=
{=0A=
if (format & DT_SINGLELINE)=0A=
+ {=0A=
+ singleline_count =3D *count;=0A=
*count =3D 0;=0A=
+ }=0A=
else=0A=
{=0A=
while ((*count) && str[i] !=3D CR && str[i] !=3D LF)=0A=
@@ -776,7 +780,10 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const =
WCHAR *str, int *count,=0A=
if (*count)=0A=
return (&str[i]);=0A=
else=0A=
+ {=0A=
+ if (singleline_count) *count =3D singleline_count;=0A=
return NULL;=0A=
+ }=0A=
}=0A=
=0A=
=0A=
@@ -852,6 +859,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT =
i_count,=0A=
int width =3D rect->right - rect->left;=0A=
int max_width =3D 0;=0A=
int last_line;=0A=
+ int strcount;=0A=
int tabwidth /* to keep gcc happy */ =3D 0;=0A=
int prefix_offset;=0A=
ellipsis_data ellip;=0A=
@@ -877,6 +885,8 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT =
i_count,=0A=
}=0A=
}=0A=
strPtr =3D str;=0A=
+ =0A=
+ strcount=3Dcount;=0A=
=0A=
if (flags & DT_SINGLELINE)=0A=
flags &=3D ~DT_WORDBREAK;=0A=
@@ -991,11 +1001,13 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT =
i_count,=0A=
max_width =3D size.cx;=0A=
=0A=
y +=3D lh;=0A=
- if (dtp)=0A=
- dtp->uiLengthDrawn +=3D len;=0A=
}=0A=
while (strPtr && !last_line);=0A=
=0A=
+ if (dtp)=0A=
+ dtp->uiLengthDrawn =3D strcount - count;=0A=
+=0A=
+=0A=
if (flags & DT_CALCRECT)=0A=
{=0A=
rect->right =3D rect->left + max_width;=0A=
-- =0A=
1.6.0.2=0A=
=0A=
------=_NextPart_000_0072_01C92AD9.F46E29E0--
More information about the wine-patches
mailing list