Test case for Bug 50 [Was: Bug 50]

Dmitry Timoshkov dmitry at codeweavers.com
Mon Jan 29 21:53:45 CST 2007

"Pedro Araujo Chaves Jr." <inckie at gmail.com> wrote:

> 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.

Then probably DrawText(DT_CALCRECT) could better suit your needs.


More information about the wine-devel mailing list