Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

CListView - Item selection

Posted on 1998-09-30
1
258 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 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