Article View: borland.public.cppbuilder.nativeapi
Article #16730Re: SHGetFileInfo and system image list
From: Remy Lebeau (TeamB)
Date: Thu, 01 May 2003 21:53
Date: Thu, 01 May 2003 21:53
37 lines
3119 bytes
3119 bytes
"Dmitry Mikhilov" <dm1@fromru.com> wrote in message news:3eb18d9b@newsgroups.borland.com... > Remy, I understand what you mean, but the problem > is that column headers take their images from SmallImages > list, not from the StateImages one. Perhaps, but you have to be careful with the StateImages property. State images have additional special processing on them, both by the ListView and the OS in general. This is because state indexes are not true absolute indexes in the ImageList. Firstly, they are 1-based, not 0-based. Secondly, they are actually masked with other values, and as such they need to be translated back to indexes when needed. In fact, now that I think about it, that's probably why your images are getting messed up periodically, since you've swapped the ImageLists so the ListView/OS is probably ending up doing its extra processing on the wrong list. That would probably produce the incorrect indexes you are seeing. > So, if I shall assign system image list to SmallImages > of a listview, then how can I draw my own images > (which are not part of system image list) at ListColumns? Honestly, I don't think you're going to be able to do what you're trying to do, at least not by using the native behaviors. ListView controls simply weren't designed to properly handle everything you're tying to throw at it at once. You really should swap your ImageLists, but then you lose your header images. Leave the ImageLists as they are so the header images work, and you mess up your image indexes. You may have to simply disable the ListView's native header and use a separate THeaderControl instead. Then you can give the THeaderControl its own separate ImageList. But then you have the new chore of keeping the two components in sync with each other if the user resizes columns as such. Its a win-lose situation anyway you look at it. Gambit
Technical Details
Message-ID:
<3eb196e8$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-mailReferences:
<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> <3eb187be$1@newsgroups.borland.com> <3eb18d9b@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 15:03:06 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> <3eb187be$1@newsgroups.borland.com> <3eb18d9b@newsgroups.borland.com> Subject: Re: SHGetFileInfo and system image list Date: Thu, 1 May 2003 14:53:05 -0700 Lines: 39 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: <3eb196e8$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1051825896 207.175.226.26 (1 May 2003 14:51:36 -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