Solved

Highlighting ENTIRE line of CListCtrl

Posted on 1997-10-27
5
725 Views
Last Modified: 2013-11-20
I've already extended CListCtrl to automatically handle sorting (asc & desc) without the parent's involvement. The last step to make this thing work like a "record browser" is to have the entire row highlight when an item is selected.

Is there an easy (i.e. Most Painless) way of doing this? Does Onwer-draw set this up for the most part?

I prefer to use the derived class to do this.
0
Comment
Question by:llorenz
5 Comments
 
LVL 5

Expert Comment

by:yonat
ID: 1308901
You can use the ROWLIST sample that comes with MS Developer Studio. It implements a class CListViewEx derived from CListView, that uses owner drawn list control.
0
 
LVL 7

Accepted Solution

by:
galkin earned 100 total points
ID: 1308902
You can add LVS_EX_FULLROWSELECT style bit to your list view extended style and entire row will be selected. This is done by sending message to your list view ::SendMessage(hwndYouListView,LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM)LVS_EX_FULLROWSELECT). Remember this feature is availible in comctl32.dll version 4.70 and above.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1308903
NOTE: You CAN LEGALLY update your (or your cusomters) Win95 machine to V4.70 of COMCTL32.DLL - but you must get COM32UPD.EXE from MS to do this (it also updates some related DLL's)

You CANNOT redistribute COMCTL32.DLL by itself - only as part of the upgrade exe.

PS: If you don't want to rely on the new version - have a look at http://www.codeguru.com for source code on full row select (and lots of other goodies)

0
 

Author Comment

by:llorenz
ID: 1308904
Thanks. I wasn't aware of the 4.70 update, and I've been holding off from using IE 4.0 (Co-worker's machine is a DOG running it). I still might go the route of the code on CodeGuru, even with the messy owner-draw code, to make the install easier; but in the meantime, I am downloading the update (forget trying to navigate MS's web site, though... when is the last time the site actually worked correctly and quickly? I had to get it off of a mirror site!)
0
 

Author Comment

by:llorenz
ID: 1308905
COM32UPD.EXE didn't do the trick. I integrated the code at www.codeguru.com and that handled the problem quite nicely.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 121
not able to insert into temp table 68 157
mapBully challenge 6 113
Sed question 2 68
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…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

911 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

24 Experts available now in Live!

Get 1:1 Help Now