Solved

CListView - Item selection

Posted on 1998-09-30
1
256 Views
Last Modified: 2013-11-20
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
Comment
Question by:dib
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 150 total points
ID: 1322726
>> 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 60
Looking for a specific application/software 2 110
sum13 challenge 24 107
FizzBuzz challenge 9 81
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question