Reputation: 21
I have 2 buttons namely "disconnect"- deletes a single variable as selected in list control and perform certain actions and "delete"-permanently deletes multiple variables as selected in a list control. my requirement is to disable the "disconnect" button if multiple selections are made.for this I need to keep the count of selections made. Can someone suggest how to do this?
Upvotes: 0
Views: 224
Reputation: 1343
There is a function for that - CListCtrl::GetSelectedCount.
There is also a macro ListView_GetSelectedCount.
or you can send LVM_GETSELECTEDCOUNT message directly.
Upvotes: 1