Solved

Highlighting ENTIRE line of CListCtrl

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
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 Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

734 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