Solved

CListCtrl with single Cell Selection

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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 …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

733 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