Column provider/ file open dialog misery
I have created an Explorer extension to provide a custom column.
This column is quite happy being turned on and off on a per folder basis in
Explorer - I can tell any particular folder whether to display the column.
Now, in my application, I want to do a file open dialog (CFileDialog,
This is all ok and after no small effort I have managed to get this dialog
to use the 'Report' view by default for the ListView control.
The problem is that the dialog only shows the default columns (Name, Size,
Type etc...) and pays no attention to the individual folder settings - thus
my column is not displayed even if the particular folder is supposed to be
I can select the column to be displayed in a folder but then if I browse to
another and return the column settings have disappeared.
If I tell every folder to display the column (Tools-Folder Options-View-Like
Curent Folder) then the column wil be displayed in my file open dialog.
However, I don't want this column to be displayed for every single folder in
Explorer (I intend adding quite a few more columns which show information
inappropriate to most folders).
I know about the SHELLDEF_View and SysListView32 classes that implement the
ListView control and can get to the interfaces below:
None of these interfaces appear to have methods that allow me to manipulate
the columns shown. I know I can manually add columns with
ListView.InsertColumn() but then there is no way of populating the control
properly (or is there?) and it seems to blow up if I try and change views.
Does anyone know of a way of telling the control which columns to show, and
to get it to remember which columns are to be shown. I know it can be done
(Visual Studio.net has a dialog such as I need but it's quite possible that
that uses it's own which just happens to be very similar to the standard
dialog) but how?
I really cannot believe that one of the most used dialog boxes in the known
universe is such a pain in the ar** to use (well obviously I can but even
Do I have to implement my own IShellView + place it over the top of the
standard one? This would be annoying due to having to implemnent the
sorting, right click etc.
Thanks for any help on this particularly matter because it's driving me up
the wall : )