Test case for Bug 50 [Was: Bug 50]

Pedro Araujo Chaves Jr. inckie at gmail.com
Mon Jan 29 11:26:53 CST 2007


On 2007-01-29, Duane Clark wrote:
> GetTextExtentPoint32
>
> For some examples in Wine, look at almost any control in comctl32.

I was afraid somebody would answer that... Thanks for the quick reply,
but that isn't exactly what I need.

Here's the picture: when an application calls TextOut() for printing
text, the usual (at least in my case) call sequence in Wine is

TextOut()
TextOutA()
ExtTextOutA()
ExtTextOutW() (the one I patched)
GetTextExtentPointW()
GetTextExtentPoint32W() (the wide-char version of the one you mentioned)
GetTextExtentExPointW()
WineEngGetTextExtentExPoint() (the one that actually gets the
individual character widths)

That is, at some point, TextOut() indirectly uses
GetTextExtentPoint32() to get the dimensions, okay. But what I need is
to check the text width *after* it was output by TextOut() -- in other
words, after the function has returned, to see if it output the text
properly. In Wine, I tried the trick of making ExtTextOutW() return
the said value, and the tests passed without a hitch, which means the
text is being properly justified. The problem is that such is not an
acceptable way of doing things, and, to use Dan Kegel's words, that is
not going to fly on Windows.

To be a bit clearer, in my tests I do call GetTextExtent32() in order
to compute the remaining white space for the justification part, and
what I want to check is whether TextOut() understood it right or not.

- Pedro.



More information about the wine-devel mailing list