Solved

Highlighting ENTIRE line of CListCtrl

Posted on 1997-10-27
5
743 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

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

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 131
isEverywhere  challenge 19 82
wordappend challenge 8 200
JQuery serialize and unserialize 8 136
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

829 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