Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ListView control, selected item to remain highlighted when control looses focus

Posted on 2007-11-21
5
Medium Priority
?
491 Views
Last Modified: 2013-11-20
I'm using a couple of list controls on the same dialog and I want the selection in the first list control to remain highlighted when I make a selction in the second list control

Thanks
PS, the link to the solutiion to this question preveously asked is not valid anymore.
0
Comment
Question by:EnergyStorage
[X]
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
  • 2
  • 2
5 Comments
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 2000 total points
ID: 20329889
Resourrce editor, select the list control
property - show selection always - set it to true (ticked)
0
 

Author Comment

by:EnergyStorage
ID: 20329947
Thanks Andy, I should have know it was so simple, Arrg!
How would I go about setting the selection / not focus selection colours?
Randy
0
 
LVL 45

Expert Comment

by:AndyAinscow
ID: 20330037
Much more complex  - owner draw or custom draw I think would be what you require.
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
ID: 20330067
>>>>> How would I go about setting the selection / not focus selection colours?
That isn't so easy. You need to derive your own list control class from CListCtrl, switch ot owner draw in the resources, replace the class member by your class so that the DoDataExchange can make the subclassing,  supply the DrawItem member function, make all drawing yourself in that function

Regards, Alex
0
 

Author Comment

by:EnergyStorage
ID: 20330137
Thanks guys,
Ok thanks, I've done the more complex list control using the XListCtrl demo from the Code Project
http://www.codeproject.com/listctrl/xlistctrl.asp

I just thought there might be an easy way to change the colours used.
Randy
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

618 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