Solved

Highlighting ENTIRE line of CListCtrl

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

18 Experts available now in Live!

Get 1:1 Help Now