🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Drawing an icon

#11432
From: Malcolm Smith
Date: Tue, 10 Feb 2004 23:13
26 lines
1636 bytes
I'm trying to draw a system icon but it is not displaying correctly.

TIcon *Icon = new Graphics::TIcon;
Icon->Handle = ::LoadIcon(0, IDI_QUESTION);
::DrawIcon(imgIcon->Canvas->Handle, 0, 0, Icon->Handle);
....
delete Icon;


I tried drawing on the form canvas and nothing was shown.  I then tried a
TImage.  This works except for the following:

1) when Transparency is enabled the icon does not show the white area (it
becomes the transparent colour)

2) when transparency is not enabled I get a white box surrounding the system
icon image.

How do I get the best of both worlds so I get the icon to display correctly
?


-- 
Malcolm Smith
MJ Freelancing
http://www.mjfreelancing.com
Technical Details
Message-ID: <40296666@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!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-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2e2fdffa598d0cc5
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-02-10 15:40:00 PST
Reply-To: "Malcolm Smith" <m.smith@comvision.net.au>
From: "Malcolm Smith" <m.smith@comvision.net.au>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Drawing an icon
Date: Wed, 11 Feb 2004 10:13:05 +1100
Lines: 30
Organization: Comvision Pty Ltd
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: 203.51.22.164
Message-ID: <40296666@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1076455014 203.51.22.164 (10 Feb 2004 15:16:54 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail