Highliting items in list control
-
Hi ! Anybody knows how can I highlite a specific line in the list control ? If I try SetBkColor(..) it will do it fot the whole list. I want to highlite just few items ? Thank you !:omg:
-
Hi ! Anybody knows how can I highlite a specific line in the list control ? If I try SetBkColor(..) it will do it fot the whole list. I want to highlite just few items ? Thank you !:omg:
SetItemState(itemIndex, LVIS_SELECTED, LVIS_SELECTED); or SetItemState(itemIndex, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
-
SetItemState(itemIndex, LVIS_SELECTED, LVIS_SELECTED); or SetItemState(itemIndex, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
Great, works well
-
Hi ! Anybody knows how can I highlite a specific line in the list control ? If I try SetBkColor(..) it will do it fot the whole list. I want to highlite just few items ? Thank you !:omg:
-
You will most likely have to implement a custom draw algorithm for a specific line. Browse the list control section of CodeProject and CodeGuru for examples. Kuphryn
To enable full row highlighting in a list control:
m_ctrlList.SetExtendedStyle(m_ctrlList.GetExtendedStyle() | LVS_EX_FULLROWSELECT);
- Rob