Sample lister plugin with list view control using Win32 API

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Sample lister plugin with list view control using Win32 API

Post by *tbeu »

Hi,

I uploaded a sample lister plugin with list view control using the Win32 API: wlx_example_1.0.0.0.zip (52 kByte). This sample plugin can be used for the development of further lister plugins making use of the list view control.

And I have a question: Who can tell me how to sort the columns of the list view control?

Thank you for your support,
tbeu
Last edited by tbeu on 2005-07-28, 12:35 UTC, edited 2 times in total.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

Hi there!

That's one big problem :) We solved it for our spam fighter, but it sure wasn't easy. The problem is that one don't want to go the owner-drawn way, which is fairly easy - but then you loose the XP look and feel in your listview.

What we ended up doing was essentially the following:
  1. Make an image list for the up/down arrows
  2. Catch system events for color and font changes to remake these imagelists
  3. Catch the Change event for the columns to redraw the image when the user resizes the columns (HDN_ITEMCHANGED, HDN_ITEMCHANGING) calling Header_SetImageList and Header_SetItem to do the redraw
Sorting the items should be relatively easy compared to this :)
Best regards,
Christian Tiberg
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

A sample lister plugin with list view control?!?

What is the big difference between this lister plugin and the original one.
What are the advantages?
______________________
David Jorge
Personal License #117854
User avatar
tbeu
Power Member
Power Member
Posts: 1354
Joined: 2003-07-04, 07:52 UTC
Location: Germany
Contact:

Post by *tbeu »

From MSDN: A list-view control is a window that displays a collection of items; each item consists of an icon and a label.

This sample plugin uses the list view control for displaying sample items and subitems. It may be used by other developers of lister plugins as a starting base if they need to use the list view control.
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
djorge
Senior Member
Senior Member
Posts: 422
Joined: 2003-07-03, 12:48 UTC
Location: Portugal

Post by *djorge »

Thanks.
______________________
David Jorge
Personal License #117854
Post Reply