Article View: borland.public.cppbuilder.nativeapi
Article #464ExtractIcon and x16 icons
From: Mike Collins
Date: Fri, 07 Mar 2008 13:25
Date: Fri, 07 Mar 2008 13:25
17 lines
1651 bytes
1651 bytes
Hi all, just got two quick quesitons regarding ExtractIcon - can't seem to find the answers anywhere. I have a UI and i want to display the (default) icon for a give executable. I'm using a TImage and i want to display the resultant icon as a 16x16 image. I use ExtractIcon to get the target applications icon (using 0 as the last parameter) but it always returns me a 32x32 icon - maybe i'm missing something about the HICON ? but could anyone tell be how to get the 16x16 image or convert this. Also, if i assign the returned HICON handle to a TIcon (Image1->Picture->Icon->Handle = ExtractIcon(HInstance, "some.exe", 1)) do i need to call DestroyIcon() when i'm finished with it? Thanks in advance, Mike
Technical Details
Message-ID:
<47d13ff2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,249d4f00026714e4,start X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Mike Collins" <its@TheBottomOfThePost> Newsgroups: borland.public.cppbuilder.nativeapi Subject: ExtractIcon and x16 icons Date: Fri, 7 Mar 2008 13:25:26 -0000 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.3959 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133 NNTP-Posting-Host: 89.240.148.143 Message-ID: <47d13ff2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1204895730 89.240.148.143 (7 Mar 2008 05:15:30 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail