In my program I'm getting data for one ListView from a database. I want to implement right click pop up menu for this ListView so I can manipulate the contents in the list view.
So my question is: Is there any way to keep the ID from the database in some "hidden column" in the list view so when the user clicks on an item I can directly get the ID of that item for example for deleting or editing.
I'm just curious: Is there any way to keep aditional data in comboboxes too?
P.S. Sorry for my bed English.
For the list view control have a look at the lParam member of the LVITEM struct. To set this value using ListView_SetItem or retrieve it using ListView_GetItem the mask value must include LVIF_PARAM.
For a combo box control have a look at the CB_SETITEMDATA and CB_GETITEMDATA messages.
Or you could just set the columnwidth to 0 for the hidden column.