🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Creating an icon (short)

#16043
From: Chris
Date: Sun, 01 Jun 2003 18:49
21 lines
1534 bytes
I posted this message yesterday, but it's not showing up in my Outlook
anymore? probably just my computer acting up....


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: <3eda4ab0$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,1a231bbe6eb7638e
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-01 11:52:54 PST
From: "Chris" <Chris8852@adelphia.net>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Creating an icon (short)
Date: Sun, 1 Jun 2003 14:49:18 -0400
Lines: 24
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: <3eda4ab0$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054493360 68.65.164.124 (1 Jun 2003 11:49:20 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail