On Sun, Apr 24, 2022, 2:18 PM Jinoh Kang <jinoh.kang.kr@gmail.com> wrote:
On 4/24/22 06:27, Nikolay Sivov wrote:
>
>
> On 4/23/22 20:53, Jinoh Kang wrote:
>> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52673
>> Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
>> ---
>>
>> Notes:
>>      v1 -> v2: no changes
>>           v3 -> v4:
>>      - Remove patch "shell32: Factor out ShellItem_get_uiobject."
>>      - Use IShellItem2_BindToHandler instead of factoring out
>>        ShellItem_get_uiobject
>>      - Use CreateCompatibleDC(NULL) instead of GetDC(NULL)
>>      - Remove new dependency on win32u, use GetIconInfo instead
>>      - Remove new dependency on windowcodecs, use gdiplus instead
>>
> I probably missed earlier iterations, but why do you need to use gdiplus at all?

Because you have to convert potentially-transparent HICON to HBITMAP with alpha channel, which is quite a complicated feat.

1. HICON can take many pixel formats, ranging from 32-bit ARGB and monochrome with mask.

s/and/to/

2. hbmColor and hbmMask combinations aren't exactly simple to handle.
3. Windows always seems to output a 32-bit ARGB bitmap. GDI routines alone aren't particularly suited for the task (GdiAlphaBlend works with PARGB, not ARGB).

Only WIC and GDI+ has functions to handle most of these.

have*

Also, shellole.c already imports GDI+ APIs.


--
Sincerely,
Jinoh Kang