Hi,
I'n online vacation. I'll be back next week.
Best,
Scuri
Em 20/02/2015 08:10, "Nodir Temirkhodjaev" <[email protected]> escreveu:
> Hello,
>
> I'm trying to use 32bpp bitmap for tab in Lua by:
> tabimage = "image.bmpx"
> It shows the image, but it's not transparent (white bg).
>
> Bitmap file saved from Paint.Net with BMPX plugin.
>
> As described in [1]:
> "
> - Export your PNG data as a 32x16 32bpp bitmap file containing
> pre-multiplied alpha channel data.
> - Create the imagelist using the ILC_COLOR32 value.
> - LoadImage() with LR_CREATEDIBSECTION to load the bitmap as a 32bpp dib
> section.
> - Add the image using ImageList_Add()
> "
>
> Please consider to change following lines in "src\win\iupwin_tabs.c", line
> 359:
> ===
> image_list = (HIMAGELIST)SendMessage(ih->handle, TCM_GETIMAGELIST, 0, 0);
> if (!image_list)
> {
> UINT flags = ILC_COLOR32|ILC_MASK;
>
> /* must use this info, since image can be a driver image loaded from
> resources */
> iupdrvImageGetInfo(bmp, &width, &height, &bpp);
>
> /* create the image list if does not exist */
> image_list = ImageList_Create(width, height, flags, 0, 50);
> SendMessage(ih->handle, TCM_SETIMAGELIST, 0, (LPARAM)image_list);
> }
> else
> iupdrvImageGetInfo(bmp, &width, &height, &bpp);
> ===
>
> to:
> ===
> /* must use this info, since image can be a driver image loaded from
> resources */
> iupdrvImageGetInfo(bmp, &width, &height, &bpp);
>
> image_list = (HIMAGELIST)SendMessage(ih->handle, TCM_GETIMAGELIST, 0, 0);
> if (!image_list)
> {
> UINT flags = ILC_COLOR32|(bpp == 8 ? ILC_MASK : 0);
>
> /* create the image list if does not exist */
> image_list = ImageList_Create(width, height, flags, 0, 50);
> SendMessage(ih->handle, TCM_SETIMAGELIST, 0, (LPARAM)image_list);
> }
> ===
>
> [1]
> http://stackoverflow.com/questions/632622/imagelist-transparency-on-listviews
>
> -- Nodir
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users