[Bug 18578] New: Wine reverses big/small icon resources in WM_SETICON

wine-bugs at winehq.org wine-bugs at winehq.org
Fri May 22 17:08:30 CDT 2009


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

           Summary: Wine reverses big/small icon resources in WM_SETICON
           Product: Wine
           Version: 1.1.21
          Platform: PC-x86-64
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P2
         Component: user32
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: emwine at earthlink.net


Created an attachment (id=21241)
 --> (http://bugs.winehq.org/attachment.cgi?id=21241)
Testcase binary and source (VC 6.0 command line for compiling at end of c file)

This could be two bugs, could be one-- I'm not sure.  This occurs both in
WM_SETICON, and also when registering a WNDCLASS structure with
RegisterClassEx().

When calling WM_SETICON, wParam indicates whether or not to use the big or
small resource. (ICON_BIG, or ICON_SMALL).  Windows reverses these, Wine
doesn't.  Running the testcase:

Windows:
icon, then press 'b': get 16x16 IDI_ICON
icon, then press 's': get scaled 32x32 IDI_ICON

Wine:
wine icon, then press 'b': get scaled 32x32 IDI_ICON
wine icon, then press 's': nothing at all

For Wine, you may have to hit 'b' a few times, even restarting the app before
it works-- I don't know why it's flaky.

I noticed this problem because I had ugly icons in my MFC MDI app in Wine, and
realized it was scaling the 32x32 resource instead of using the 16x16 one. 
When writing the app, I noticed that CWnd::SetIcon(HICON, BOOL bBig) reversed
the 2nd parameter in reality.  Probably Wine just went by the docs and nobody
noticed the docs are reversed from reality.

The other issue that may in fact be the same bug is that the WNDCLASS
structure's icons are reversed as well.  I'm thinking it's the same windows bug
responsible for the reversal with the documentation manifesting itself in
multiple places.  So it's entirely possible it's just one issue in Wine also
since Wine doesn't reverse them.  Running the testcase again:

Windows:
icon:                 IDI_APPLICATION used (hIconSm)
icon foo:             IDI_QUESTION used (hIconSm)

Wine:
wine icon:            IDI_QUESTION used (hIcon)
wine icon foo:        IDI_APPLICATION used (hIcon)

There's also a question of what happens when you use hInstance instead of NULL
in the LoadIcon() calls, but this bug isn't dealing with that problem.

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