[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

How to make the listctrl item selected(not greyed but with blue background)  even when the focus is not in listctrl

Posted on 2000-03-31
5
Medium Priority
?
406 Views
Last Modified: 2013-11-20
Hi Guys,

I want the item in the listctrl to remain selected when not in focus. I know that LVS_SHOWSELALWAYS makes it highlighted but it is like a disabled text. I want it to remain with blue background and white text. This is there in clistbox. But not in list ctrl.
Do you know any other way?
0
Comment
Question by:vmadhipatla
[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
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 400 total points
ID: 2673421
Take a look at http://codeguru.developer.com/listview/LVHighlight.shtml
Idea is the same: change way how item is highlighted
0
 
LVL 8

Expert Comment

by:gelbert
ID: 2673427
By the way, ahother good artical on the same topic
http://www.codeproject.com/listctrl/LVCustomDraw.asp
0
 
LVL 1

Author Comment

by:vmadhipatla
ID: 2679900
I myself figured it out that SetItemState(nIndex,LVIS_DROPHILITED,LVIS_DROPHILITED) will make it highlited in blue and it remains highlited even if the focus is not in control. The only thing is we have to make sure that we remove the highlite each time another item is selected.

Anyway, i'll accept gelbert's comment as answer and provide him the points promised.

Thanks
venkatesh

0
 
LVL 1

Author Comment

by:vmadhipatla
ID: 2679918
Gelbert's suggested site provides some more good way of handling the highliting of listcontrol. Even though i figured it out myself, i think the coding given in gelbert's site provides good answer to this most common problem faced by developers.

regards
venkatesh
0
 
LVL 1

Author Comment

by:vmadhipatla
ID: 2822849
Hi Guys,

I found the problem.
I had a
OnUpdateTbrbtnright(CCmdUI* pCmdUI)
for one of the toolbar buttons.
It was checking for Curpos and i think
this was continuously in a loop obstructing the tooltip message.

I think i'll delete the question.

Regards
Venkatesh
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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 …
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…
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

650 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