🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2628

Problem with ExtractIcon in BDS2006

#2628
From: FEEX
Date: Wed, 07 Feb 2007 17:58
20 lines
1551 bytes
I created an executable (SFX) file with an icon 32 x 32 and 16 colors.

In BCB5 and BCB6 when i extracted the icon from that file with
  HICON hico = ExtractIcon(HInstance, File.c_str(), 0);
I got the original icon size is 766 bytes

Now when I do the same using TurboC++ 2006 I receive an icon 32 x 32 but 
with 2^32 colors. size is 4KB

Is there anything we can do to extract the icon from this ( or any other 
file) with its original size and color dept?
Or has somebody a function to replace an icon by another one with 
different size that can/will work all windows version
(ReplaceResource only works in NT based systems)


-- 
Roger Aelbrecht
www.drehoeksw.net
www.bcbzip.net
Technical Details
Message-ID: <45ca135e@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,d31afbf0207af4b7,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 07 Feb 2007 18:58:58 +0100
From: FEEX <feex@drehoek.net>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Problem with ExtractIcon in BDS2006
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 87.66.120.192
Message-ID: <45ca135e@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170871134 87.66.120.192 (7 Feb 2007 09:58:54 -0800)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail