Tech Support > Microsoft Windows > Development Resources > Re: Unique id to item in listview
Re: Unique id to item in listview
Posted by Luca on August 27th, 2003


Corno wrote:

Use the lParam item of the LVITEM structure. Then use LVM_FINDITEM to find
an item in the list.

Luca




Posted by Corno on August 27th, 2003



"Luca" <no@mail.net> wrote in message
news:bii6m7$5ns$1@galileo.it.ip-plus.net...

And what to do for columns? (They don't have a lParam and connot be found).

Corno



Posted by Luca on August 27th, 2003


Corno wrote:
Subitems (other than first columns items) can't have lParam, only firs
element of a raw (the Item) can have it, but once you have found the Item
you can read Subitems with ListView_GetItemText. Read the MSDN documentation
(either online or downloaded) for further details on ListView.

Luca



Posted by Corno on August 27th, 2003



"Luca" <no@mail.net> wrote in message
news:biih1g$7te$1@galileo.it.ip-plus.net...
I think you are referring to 'cells' by the way and I really meant the
columns.

No matter anymore, I realized that I only needed such an ID to delete a
column, I'm now just deleting column 0 untill there are no more columns.

Corno




Posted by Sten Westerback on August 27th, 2003



"Corno" <corno@%spam%.dds.nl> wrote in message
news:biilmg$8il$1@reader11.wxs.nl...
Yeah.. this is a clearly a LV design miss. The only ways you can find out
at which index a column with a specific name is to enumerate them,
read the column name and compare. Another feature missing would be
LVM_REMOVEALLCOLUMNS which you already found out how
to do yourself.

- Sten



Posted by Luca on August 27th, 2003


In article <biilmg$8il$1@reader11.wxs.nl>, corno@%spam%.dds.nl says...
Ups... Sorry, I missed the poiny. Anyway, glad to see you have solved
the problem by yourself . And, yes, listview implementation is a
bit... fancy!

Luca


Similar Posts