Article View: borland.public.delphi.nativeapi
Article #57TListView BackGround Image Insert ....after "Icon Transparent Area" are not transparent
From: 유영제
Date: Mon, 10 Dec 2012 07:28
Date: Mon, 10 Dec 2012 07:28
51 lines
2441 bytes
2441 bytes
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?
Technical Details
Message-ID:
<1b73ab61-7fb0-455d-be2a-c8d45718ff23@googlegroups.com>Path:
arc1-ca.pugleaf.net!s9ni32536pbb.0!nntp.google.com!kt20no8003018pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f94dd,5973d4dbd0a104b5,start
X-Google-NewGroupId: yes
X-Google-Attributes: gidd87a9a9c78,domainid0,public,usenet
X-Google-Language: ENGLISH,UTF8
Received: by 10.66.84.100 with SMTP id x4mr3073452pay.43.1355124515469;
Sun, 09 Dec 2012 23:28:35 -0800 (PST)
Received: by 10.50.5.174 with SMTP id t14mr2150447igt.11.1355124515238; Sun,
09 Dec 2012 23:28:35 -0800 (PST)
Path: arc1-ca.pugleaf.net!s9ni32536pbb.0!nntp.google.com!kt20no8003018pbb.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: borland.public.delphi.nativeapi
Date: Sun, 9 Dec 2012 23:28:34 -0800 (PST)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=116.33.210.131;
posting-account=m03_OgoAAACZjf62F33snNdksDt6qrdu
NNTP-Posting-Host: 116.33.210.131
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1b73ab61-7fb0-455d-be2a-c8d45718ff23@googlegroups.com>
Subject: TListView BackGround Image Insert ....after "Icon Transparent Area"
are not transparent
From: 유영제 <happymanxyz@gmail.com>
Injection-Date: Mon, 10 Dec 2012 07:28:35 +0000
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable