Solved

CListCtrl with single Cell Selection

Posted on 2008-06-19
4
1,355 Views
Last Modified: 2013-11-20
I have a little problem.
I need to highlight only a single cell from a CListCtrl with report style.
I know I have to call DrawItem and make the control OwnerDrawFixed but for some reason I can not make the single cell selection work. It either does nothing or it selects only the first column item. I use most of the DrawItem code from the MS rowlist example.
0
Comment
Question by:Choklander
  • 3
4 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21827066
you just need to set the LVS_SINGLESEL flag for the control.
0
 

Author Comment

by:Choklander
ID: 21827341
Sorry I guess I didn't explain the entire problem.
I need to have a single Cell highlighted. If I click on a cell from the second column only that cell should be highlighted. The cell from the first column of that same row must not be highlighted.
Like Excel.
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 21827463
have a look to this article:
http://www.codeproject.com/KB/list/SubItemSel.aspx

or you can use this sophisticated control:
http://www.codeproject.com/KB/miscctrl/gridctrl.aspx
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 21827473
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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

15 Experts available now in Live!

Get 1:1 Help Now