Hi,
The suggested change is done and committed to the SVN.
Actually the use of the flag ILC_MASK should be a copy&paste from some
sample code. I don't know for sure why we used it. In IupTree we don't use
it.
Thanks for the fix.
BTW, just that solves your transparency problem?
Best,
Scuri
On Fri, Feb 20, 2015 at 8:09 AM, Nodir Temirkhodjaev <[email protected]>
wrote:
> 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
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users