🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Assigning Icon from ExtractIconEx without leaks

#188
From: Remy Lebeau (TeamB)
Date: Tue, 01 Jul 2008 22:28
18 lines
1591 bytes
"Mike Collins" <its@TheBottomOfThePost> wrote in message 
news:486aa96e@newsgroups.borland.com...

> Once i assign HICON to the TIcon->Handle, i can basically forget
> about it - the TIcon takes ownership and will be responcible for freeing 
> it?

Yes.

> Assuming that this is correct, if i need to call the same code again, 
> later on in the life-span, of the application, should i call DestroyIcon() 
> on the TIcon->Handle before i load the new icon?

No.  The Handle property's setter method will do that internally for you.


Gambit 
Technical Details
Message-ID: <486aaff6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <486a1911@newsgroups.borland.com> <486a5c9e$1@newsgroups.borland.com> <486aa96e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dea519f40adb32bd
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <486a1911@newsgroups.borland.com> <486a5c9e$1@newsgroups.borland.com> <486aa96e@newsgroups.borland.com>
Subject: Re: Assigning Icon from ExtractIconEx without leaks
Date: Tue, 1 Jul 2008 15:28:58 -0700
Lines: 20
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 207.178.157.90
Message-ID: <486aaff6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1214951414 207.178.157.90 (1 Jul 2008 15:30:14 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail