Basj
Basj

Reputation: 46373

Explorer-style ListView which contains custom list of files

When in Files Explorer we use F3 search feature, this generates a ListView which contains certain files (search results).

enter image description here

Is it possible, and if so with which WinAPI widget using Visual C++, to have a similar files explorer ListView that contains a custom list of files (files might not be in the same directory, etc.)?

i.e. a ListView which has all the native Explorer UI elements (small icons near the filename, right click opens a popup with actions to do on the files, etc.)

WinSpector says it's DirectUIHWND, but can we create one and pass an array of files to display in it?

To be more precise: I know how to display text items in a SysListView32, but how to display files, and have all the features available in Explorer (right click -> contextual menu for files, with Open, Open with, etc., F2 -> rename file, etc.) directly without having to re-code all these hundreds of features?

Upvotes: 0

Views: 812

Answers (1)

Anders
Anders

Reputation: 101764

Explorer in Windows Vista and older uses the standard listview control, Window 7 and later by default uses a custom control that looks like a listview.

Before writing your own implementation you should try IExplorerBrowser, specifically the FillFromObject method.

If you want to use a listview, the basics are:

Upvotes: 1

Related Questions