🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SHGetFileInfo and system image list

#16724
From: Remy Lebeau (TeamB)
Date: Thu, 01 May 2003 18:16
26 lines
2032 bytes
"Dmitry Mikhilov" <dm1@fromru.com> wrote in message
news:3eb15950@newsgroups.borland.com...

> Just adding TListItems and picking StateImage's
> indexes for them...

Any particular reason why you are using StateImages instead of just Images?
They are separate properties of the TListView.

Also, it is hard to tell from your code, but are you passing a full path to
SHGetFileInfo() when retrieving an index?  I'm guessing that you are only
passing a filename without any path as well.

Also, when calling SHGetFileInfo(), you removed your SFGAO_SHARE flag.  You
should leave that in there:

    FileIcons->Handle = SHGetFileInfo("", SFGAO_SHARE, &Si,
sizeof(SHFILEINFO), SHGFI_SMALLICON | SHGFI_SYSICONINDEX);
    FileIcons->ShareImages = true;

    SHGetFileInfo(FileName.c_str(), SFGAO_SHARE, &Si, sizeof(SHFILEINFO),
SHGFI_ICON | SHGFI_SHELLICONSIZE | SHGFI_SYSICONINDEX | SHGFI_SMALLICON);


Gambit
Technical Details
Message-ID: <3eb1640d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.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>

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 11:19:01 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>
Subject: Re: SHGetFileInfo and system image list
Date: Thu, 1 May 2003 11:16:04 -0700
Lines: 28
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: <3eb1640d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051812877 207.175.226.26 (1 May 2003 11:14:37 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail