• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

CListView - Item selection

hi,
I have two list views ( derived from CListView ) in a
Splitter Wnd. I need the folowing behaviour:
If I select an item in one of the views a secound item
in the other view should be selected ( or marked!? ...blue
background ...). If I remove the focus from the view the
items in the view are not longer selected!It seems to me,
that items can only be selected if the view including them,
has the focus!? So only one view can have selected (marked)
items!
Am I right?
dib
0
dib
Asked:
dib
1 Solution
 
Answers2000Commented:
>> Am I right ?
No

Add LVS_SHOWSELALWAYS4 style to the listview and it will always show its selection even when it doesn't have the focus.  You can add this style when creating the window or by overriding PreCreateWindow and using
cs.style |= LVS_SHOWSELALWAYS ;

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now