Solved

CListCtrl with single Cell Selection

Posted on 2008-06-19
4
1,373 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ODBC Connection Logging, ADO.NET 6 64
sum28 challenge 31 111
fizzArray  challenge 1 82
My project did see openJDK that I installed. What could be the problem 7 140
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

775 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