Reputation: 371
I created a listView:
ListView = CreateWindow(WC_LISTVIEW, NULL, WS_CHILD | WS_VISIBLE | LVS_REPORT,
50,50,200,100,
hwnd, (HMENU) ID_LISTV,
GetModuleHandle(NULL),
NULL);
after that I fill with data
And after that I would like to delete all item and column. how can i do this? thanks!
Upvotes: 0
Views: 2662
Reputation: 37132
You can clear a listview's contents using the LVM_DELETEALLITEMS
message (or associated macro):
ListView_DeleteAllItems(ListView);
You can delete columns using the LVM_DELETECOLUMN
message. There's no way to delete them all at once; you need to do them one by one.
Upvotes: 5