List View column
I have a list view control that currently has 3 columns (File Name, Directory, Value). I would like to add a 4th column that would hold information about the file, but I don't want to display that information. In other words, I would like to have an invisible column. My question is this: Is there a way to have an invisible column in a list view control?
Thanks in advance
I do not see the need for an "invisible" column. If you want to store data and not have the users see the data, then store the data into a data structure such as vector, list, etc. of strings.
The LVITEM struct includes a 32-bit LPARAM value that could act as storage space for an int (or lesser data type, such as char) or pointer since both will fit into the four byte space. The only problem with this approach is that the lparam is sent to the application's comparison function by the view if you sort items, meaning you may be forced to sacrifice this functionality if you used this feature.
So, you could copy your additional information into a buffer and store a pointer in lparam, eliminating the need to keep track of another whole vector, queue, stack, etc.