Article View: borland.public.cppbuilder.nativeapi
Article #16037Creating an icon (short)
From: Chris
Date: Sun, 01 Jun 2003 03:37
Date: Sun, 01 Jun 2003 03:37
17 lines
1411 bytes
1411 bytes
Here is my code, it seems to make a full color icon, but it saves it to a 16 color one. Any idea how to make it save to a full color icon? Image1->Picture->LoadFromFile(Open->FileName); ICONINFO i; i.hbmColor = Image1->Picture->Bitmap->Handle; i.fIcon = true; i.hbmMask = Black->Picture->Bitmap->Handle; i.xHotspot = 0; i.yHotspot = 0; HICON icon = CreateIconIndirect(&i); Image2->Picture->Icon->Handle = icon; Image2->Picture->Icon->SaveToFile(Open->FileName+".ico");
Technical Details
Message-ID:
<3ed974e4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1a231bbe6eb7638e,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-05-31 20:41:17 PST From: "Chris" <Chris8852@adelphia.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Creating an icon (short) Date: Sat, 31 May 2003 23:37:06 -0400 Lines: 19 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 68.65.164.124 Message-ID: <3ed974e4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1054438628 68.65.164.124 (31 May 2003 20:37:08 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail