🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SHGetFileInfo and system image list

#16728
From: Remy Lebeau (TeamB)
Date: Thu, 01 May 2003 20:48
40 lines
2596 bytes
"Dmitry Mikhilov" <dm1@fromru.com> wrote in message
news:3eb18101@newsgroups.borland.com...

> I use SmallImages for representing the status of the files
> (i.e. are they locked or not) which are either linked or
> embedded  to database

That is what StateImages should be used for instead - the "state" of each
item.

> whilst StateImages represent their filetypes

That is what Small/LargeImages should be used for instead - the "icon" of
each item.

> I tried to swap image lists for SmallImages and StateImages,
> but in this case wrong icons appeared as SmallImages, as
> you could possibly expect.

Yes.  But better that SmallImages be messed up then StateImages.  You
wouldn't want an item appearing as locked when it's really not, etc.

> Yes, I did it exactly in this way from the very beginning. SFGAO_SHARE was
> removed when I tried to use the example provided by Nick Cassos.
> Of course, FileIcons->ShareImages is set to true - this list doesn't own
> images provided by Windows.

ShareImages only tells TImageList that the image list is shared.  But
SHGetFileInfo() should also be told as well that the image list is shared,
so it can optimize itself internally as appropriate.

> I feel that the problem is very simple, but nevertheless
> is beyond my comprehension...

Please create and post an actual compilable sample project to the
.attachments group that demonstrates the problem you are seeing.


Gambit
Technical Details
Message-ID: <3eb187be$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!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3eb0bdcd@newsgroups.borland.com> <18t1bv0lpjgqv1tblq09gh7u0j87hjtj2i@4ax.com> <3eb10399@newsgroups.borland.com> <3eb14f98$1@newsgroups.borland.com> <3eb15950@newsgroups.borland.com> <3eb1640d$1@newsgroups.borland.com> <3eb18101@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,577f7a686a96c6b6
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-01 13:54:42 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3eb0bdcd@newsgroups.borland.com> <18t1bv0lpjgqv1tblq09gh7u0j87hjtj2i@4ax.com> <3eb10399@newsgroups.borland.com> <3eb14f98$1@newsgroups.borland.com> <3eb15950@newsgroups.borland.com> <3eb1640d$1@newsgroups.borland.com> <3eb18101@newsgroups.borland.com>
Subject: Re: SHGetFileInfo and system image list
Date: Thu, 1 May 2003 13:48:23 -0700
Lines: 42
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: 207.175.226.26
Message-ID: <3eb187be$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051822014 207.175.226.26 (1 May 2003 13:46:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail