Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TListView BackGround Image Insert ....after "Icon Transparent Area" are not transparent

126 views
Skip to first unread message

유영제

unread,
Dec 10, 2012, 2:28:34 AM12/10/12
to

1. ListView ..BackGround Image Insert

TListView.. OnCustomDraw

Code)
BMP := TBitMap.Create;
Try
BMP.LoadFromFile('배경.bmp');
ListView.Canvas.Brush.Bitmap := BMP;

ListView.Canvas.FillRect(Rect(0,0,ListView.ClientWidth,ListView.ClientHeight));

finally
(Sender as TListView).Canvas.Brush.Bitmap := nil;
FreeAndNil(BMP);
end;
SetBkMode(ListView.Canvas.Handle,TRANSPARENT);
ListView.Perform(LVM_SETTEXTBKCOLOR,0,LongInt(CLR_NONE));
ListView_SetBKColor(ListView.Handle,CLR_NONE);


2. OK - BackGround Image Insert...

3. ListView ...ListItem Add (file path)

Code)
SHGetFileInfo(PChar(edFileName.Text), 0, shInfo, SizeOf(shInfo),
SHGFI_ICON or SHGFI_LARGEICON or SHGFI_SYSICONINDEX
);

Icon.Handle := shInfo.hIcon; //Icon := TIcon.Create;
ListItem.ImageIndex := imageList.AddIcon(Icon);
// imageList > TImageList
// TImageList Width, Height = 32;
// BkColor, BlendColor = clNone
// ImageType = itMask

4. ㅠ..ㅠ
ItemList Add Succed..

5. But Fail. "Icon Transparent Area" are filled with black color.


What should I do?





ericksys...@gmail.com

unread,
Aug 19, 2015, 5:48:59 PM8/19/15
to
yo también estoy buscando eso.
0 new messages