[Bug 175] CreateIcon does not resize bitmaps

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Sep 22 05:41:30 CDT 2009


http://bugs.winehq.org/show_bug.cgi?id=175


Wilfried Pasquazzo <wilfried.pasquazzo at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wilfried.pasquazzo at gmail.co
                   |                            |m




--- Comment #15 from Wilfried Pasquazzo <wilfried.pasquazzo at gmail.com>  2009-09-22 05:41:23 ---
This is not a bug with "CreateIcon".

The problem in the test-application is the "DrawIcon" method, which fails to
stretch the Icons to the "System Large"-size when drawing, and NOT the
"CreateIcon" method. To resize the bitmaps during creation would be wrong.

--
Citations from http://msdn.microsoft.com/en-us/library/ms997538.aspx:

"CreateIcon and CreateIconIndirect, even though they have their roots in 16-bit
land, do facilitate creating icons of different sizes. CreateIcon accept a
desired width and height as parameters"

"DrawIcon always draws the icon at System Large size. If a different size icon
is passed to DrawIcon, it is stretched and displayed at System Large size."
--

I'll attach a modified test-application, and WindowsXP/Wine-Screenshots of it.
The first line of icons is drawn with "CreateIcon", which should ignore the
real icon size and draw them all at the same "system large"-size.

The second line of icons is drawn with "CreateIconEx", which draws the icons in
their real icon size (2x2, 16x16, 16x16 and 16x16).
As can be seen, the second lines look the same in both screenshots, therefore
the icons are created with same sizes in Windows and Wine. (The wrong colors in
my wine-screenshot are likely unrelated to this bug).

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list