🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ListView Icons

#15780
From: Remy Lebeau (TeamB)
Date: Thu, 19 Jun 2003 07:07
29 lines
1971 bytes
"Bob" <bob@spam.com> wrote in message
news:3ef125cf$1@newsgroups.borland.com...
> I am looking at the Microsoft help on that function
> and it does not describe anything about a OS's global list.

Sure it does, you just have to read the comments very closely:

    SHGFI_SYSICONINDEX
        Retrieve the index of a system image list icon. If successful, the
index is copied to the iIcon member of psfi. The return value is a handle to
the system image list.

Look very closely at the last sentence of the above comment.  With that
said, here is the code I use myself for my own projects:

    SHFILEINFO fi = {0};
    ImageList1->Handle = SHGetFileInfo("", SFGAO_SHARE, &fi, sizeof(fi),
SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
    ImageList1->ShareImages = true;

    //...

    SHGetFileInfo("some filename", SFGAO_SHARE, &fi, sizeof(fi),
SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
    SomeListItem->ImageIndex = ft.iIcon;


Gambit
Technical Details
Message-ID: <3ef16044$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3ef10bc3$1@newsgroups.borland.com> <3ef11f72$1@newsgroups.borland.com> <3ef125cf$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,c0b5f7c930a24ebf
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-19 00:06:11 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ef10bc3$1@newsgroups.borland.com> <3ef11f72$1@newsgroups.borland.com> <3ef125cf$1@newsgroups.borland.com>
Subject: Re: ListView Icons
Date: Thu, 19 Jun 2003 00:07:30 -0700
Lines: 31
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: <3ef16044$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1056006212 207.175.226.26 (19 Jun 2003 00:03:32 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail