List control background images

15 views
Skip to first unread message

Gaku

unread,
Feb 29, 2020, 8:40:47 PM2/29/20
to TortoiseSVN
I would like to talk about how to use LVBKIF_FLAG_ALPHABLEND.

- List control background images · TortoiseSVN
https://tortoisesvn.net/listcontrolbackground.html

We must use a premultiplied alpha bitmap.

- Alpha compositing · wikipedia
https://en.wikipedia.org/wiki/Alpha_compositing

LVBKIMAGE lv = {0};
lv.ulFlags = LVBKIF_TYPE_WATERMARK|LVBKIF_FLAG_ALPHABLEND;
lv.hbm = hbm; //<-- This must be a premultiplied alpha bitmap
SetBkImage(&lv);

I am using "IWICFormatConverter->CreateFormatConverter" and "GUID_WICPixelFormat32bppPBGRA" to convert to a multiplied alpha bitmap.

- IWICImagingFactory::CreateFormatConverter method
https://docs.microsoft.com/ja-jp/windows/win32/api/wincodec/nf-wincodec-iwicimagingfactory-createformatconverter

I use this in my software.
When you install an add-on "Preview in background", the selected image will be displayed in the background of Listview.
You can also change the background color by installing the add-on "Color".

- Tablacus Ecplorer
https://tablacus.github.io/explorer_en.html

-  Source
https://github.com/tablacus/TablacusExplorer

- Addon "Preview in background" source
https://github.com/tablacus/TablacusExplorerAddons/blob/master/bgpreview/script.js

Thank you for reading.
Best regards,
Reply all
Reply to author
Forward
0 new messages