Solved

Showing Focus on CListCtrl

Posted on 2006-11-20
2
390 Views
Last Modified: 2013-11-20
When I tab into my CListCtrl, there is no visible indication that the list has focus.  I would expect to see a dotted line surrounding an item in the list (even though the item is not selected), or something like that.  Is there any easy way to show that a CListCtrl has focus?  Once I arrow down, the first item shows as selected, but I'm afraid this point might be lost on the users.

Thanks,

Joe
0
Comment
Question by:jribble
2 Comments
 
LVL 14

Accepted Solution

by:
wayside earned 250 total points
ID: 17983110
You can handle the NM_SETFOCUS event for the list control, and set a selection yourself when the list control gets focus.
0
 
LVL 4

Expert Comment

by:bdunz19
ID: 17991193
Hi Joe,

If I'm not mistaken, you should be able to always show your selection by creating your control with the LVS_SHOWSELALWAYS style.

Good luck,
Brandon
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now