Reputation: 64346
I have a list view in a dialog. When I select some item inside list it's become selected. When I kill focus from list (for example, clicked at another window), the selection disappears. How to make it grayed(inactive) but leave in list?
Upvotes: 0
Views: 649
Reputation: 3636
There is a style called LVS_SHOWSELALWAYS
.
Set it at runtime using:
DWORD dwStyle = m_list.GetExtendedStyle();
dwStyle |= LVS_SHOWSELALWAYS;
m_list.SetExtendedStyle(dwStyle);
Upvotes: 3