Article View: borland.public.cppbuilder.nativeapi
Article #836Re: Get the icon by using "SHGetFileInfo"...
From: Remy Lebeau (TeamB)
Date: Mon, 03 Dec 2007 19:57
Date: Mon, 03 Dec 2007 19:57
20 lines
1471 bytes
1471 bytes
"Asger Joergensen" <junk@Asger-P.dk> wrote in message
news:MPG.21bd0b1963f2bda698992f@newsgroups.borland.com...
> It looks like You have to deal with the hIcon handle
>
> and then use the:
>
> DrawIconEx(
You don't need DrawIconEx(). Simply assign to the returned HICON to TIcon's
Handle property instead.
SHFILEINFO info;
if( SHGetFileInfo(FileName.c_str(), 0, &info, sizeof(info), SHGFI_ICON |
SHGFI_LARGEICON) )
ImageIco->Picture->Icon->Handle = info.hIcon;
Gambit
Technical Details
Message-ID:
<47545f65$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4751fbc8$1@newsgroups.borland.com> <MPG.21bd0b1963f2bda698992f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bee658860984a9b7 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4751fbc8$1@newsgroups.borland.com> <MPG.21bd0b1963f2bda698992f@newsgroups.borland.com> Subject: Re: Get the icon by using "SHGetFileInfo"... Date: Mon, 3 Dec 2007 11:57:15 -0800 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.29.61 Message-ID: <47545f65$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1196711781 75.83.29.61 (3 Dec 2007 11:56:21 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!club-internet.fr!feedme-small.clubint.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail