Article View: borland.public.cppbuilder.nativeapi
Article #837Re: Get the icon by using "SHGetFileInfo"...
From: Asger Joergensen
Date: Mon, 03 Dec 2007 23:15
Date: Mon, 03 Dec 2007 23:15
33 lines
1962 bytes
1962 bytes
Hi Remy Remy Lebeau (TeamB) says: > > "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; Yea, I know I can do that, but we were trying to get the Icon in 48x48 and not 32x32, so by not specifying SHGFI_LARGEICON, I was hoping for a handle to an Icon containing all the sizes.;-) But as I mention in my last post, I don't think this is the way if the system is showing 32x32 icons. Never got a reply on that one. Kind regards Asger
Technical Details
Message-ID:
<MPG.21beac6b19b49f6b989934@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!195.114.231.69.MISMATCH!feeder.news-service.com!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> <47545f65$1@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: Asger Joergensen <junk@Asger-P.dk> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Get the icon by using "SHGetFileInfo"... Date: Tue, 4 Dec 2007 00:15:16 +0100 Message-ID: <MPG.21beac6b19b49f6b989934@newsgroups.borland.com> References: <4751fbc8$1@newsgroups.borland.com> <MPG.21bd0b1963f2bda698992f@newsgroups.borland.com> <47545f65$1@newsgroups.borland.com> Organization: Asger-P MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/2.70.2067 NNTP-Posting-Host: 83.73.201.25 X-Trace: newsgroups.borland.com 1196723715 83.73.201.25 (3 Dec 2007 15:15:15 -0700) Lines: 35 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!eweka.nl!lightspeed.eweka.nl!195.114.231.69.MISMATCH!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail