Quicken/CreateCompatibleBitmap issue revisited
Carl Sopchak
carl.sopchak at cegis123.com
Sat Apr 30 12:13:44 CDT 2005
Thanks for the input, Rein. Allowing either a width or height of zero to fall
through should result in a 1x1 monochrome bitmap (I haven't tested it, but
did read through the code and it looks like that would be returned).
However, the other points that I made call into question the need for the
check at all. XP has no size limit to a bitmap, at least that's mentioned on
MSDN.
Is the intention of this condition one of a "sanity check"? If so, should it
be modified or even removed? Has this code been around long enough so that
the check isn't needed? (I.e., was it included for stability/wine bug
checking purposes?) Or, maybe changing it to check that BOTH are >= 0x10000,
or maybe their product is >= 0x100000000 [can we get that precision on all
wine platforms?] would be reasonable? Or, do we go with the 16Mb Win95
limit?
Thoughts?
Carl
On Friday, April 29, 2005 02:13 pm, Rein Klazes wrote:
> On Fri, 29 Apr 2005 10:46:31 -0400, you wrote:
> > This seems wrong to me on
> > three counts: (1) MSDN states that if either width or height is zero, a
> > 1x1 monochrome bitmap is returned
>
> Indeed, what happens if you try this obvious patch:
>
> ========================================>8=================================
>====== --- wine/dlls/gdi/bitmap.c 2005-04-14 10:50:50.000000000 +0200
> +++ mywine/dlls/gdi/bitmap.c 2005-04-29 20:04:37.000000000 +0200
> @@ -134,7 +134,7 @@ HBITMAP WINAPI CreateCompatibleBitmap( H
>
> TRACE("(%p,%d,%d) = \n", hdc, width, height);
>
> - if ((width >= 0x10000) || (height >= 0x10000))
> + if ((height && width >= 0x10000) || (width && height >= 0x10000))
> {
> FIXME("got bad width %d or height %d, please look for reason\n",
> width, height);
> ========================================>8=================================
>======
>
> Rein.
More information about the wine-devel
mailing list