Solved

CListCtrl with single Cell Selection

Posted on 2008-06-19
4
1,335 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
Comment Utility
you just need to set the LVS_SINGLESEL flag for the control.
0
 

Author Comment

by:Choklander
Comment Utility
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
Comment Utility
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
Comment Utility
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 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