I don't see anything in the API list.. similar to LVM_GETITEMCOUNT.
Is the only way to determine the number, is to cycle through LVM_GETCOLUMN's until the API fails ?
:lol:
Sorry: I forgot to mention that the LV is in report/details view format.
Community content from http://msdn.microsoft.com/en-us/library/windows/desktop/bb761044(v=vs.85).aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/bb761044(v=vs.85).aspx)
Quote from: Reetep
Counting the number of columns
To count the number of columns, rather than the number of items (ie
rows), use the LVM_GETHEADER message to obtain a handle to the listview's
header. The header admits the admits the HDM_GETITEMCOUNT message, which returns the number of columns in the listview.
As far as I understand that message, is that it returns the Total Rows in the LV ....that is, Items only (column 0) and not the Subitems
There doesn't seem to be anything similar for Total Columns
:)
"Item" in this case means a column. The header control is separate from (but part of) the listview control.
http://msdn.microsoft.com/en-us/library/windows/desktop/hh298343(v=vs.85).aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/hh298343(v=vs.85).aspx)
QuoteA header control typically has several header items that define the columns of the control.
One way to find out.
Ah.. OK, I can see clearly now :)
Thanks