🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: EnumResourceNames

#7045
From: Remy Lebeau (TeamB)
Date: Tue, 15 Mar 2005 20:28
27 lines
2264 bytes
"jB" <.> wrote in message news:42371f2f@newsgroups.borland.com...

> If I knew how to differentiate between an icon or a group I would ...

You already know how, because your original code was doing exactly that.
You were simply counting both.

>                                 Image1->Invalidate();

There is no need to Invalidate() the TImage since you are altering the image
immediately afterwards.  Changing the image will automatically invalidate
it.

>                                 Image1->Picture->Icon->Handle =
> LoadIcon(hResourceDLL,MAKEINTRESOURCE(IconNumber));

You did not show where you are getting the IconNumber from.  Did you verify
that the number belongs to a specific icon and not a group?  Also, you did
not specific whether LoadIcon() is even returning a non-NULL handle to begin
with.  If it returns NULL then the icon is not being loaded at all.  You
might also consider using LoadImage() instead of LoadIcon().  Another
possibility is to use the TIcon::LoadFromStream() method with a
TResourceStream instead of using LoadIcon/Image().


Gambit
Technical Details
Message-ID: <423745c1$5@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4235f905@newsgroups.borland.com> <42367c11$1@newsgroups.borland.com> <42367d6a$1@newsgroups.borland.com> <4237168b$1@newsgroups.borland.com> <42371d44$1@newsgroups.borland.com> <42371f2f@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,da3abd9f4e77eb05
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4235f905@newsgroups.borland.com> <42367c11$1@newsgroups.borland.com> <42367d6a$1@newsgroups.borland.com> <4237168b$1@newsgroups.borland.com> <42371d44$1@newsgroups.borland.com> <42371f2f@newsgroups.borland.com>
Subject: Re: EnumResourceNames
Date: Tue, 15 Mar 2005 12:28:03 -0800
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <423745c1$5@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1110918593 68.69.17.41 (15 Mar 2005 12:29:53 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail