[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

disable and enable rows in CListCtrl

Posted on 2006-03-22
2
Medium Priority
?
1,287 Views
Last Modified: 2013-11-20
Is there a way you can disable and enable individual rows in CListCtrl.
0
Comment
Question by:docieb
  • 2
2 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 16261668
Not directly.  You can do the ownerdraw thing to make them *look* disabled and then take action when the user tries to select one.  

Depending on your needs, you might be able to accomplish your goal by use the checkbox style -- as a kind of stand-in for enabled/not-enabled (checked/non-checked).

There are a number of CListCtrl-derived objects available that do that.  Try checking here
    http://www.codeguru.com/cpp/controls/listview/
if you are intersted in using somebody elese ownerdraw logic.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 2000 total points
ID: 16261789
In particular, this one (by MFC Superstar Chris Mauder) seems to allow disabling of rows:

    MFC Grid control (derived from CWnd)
    http://www.codeguru.com/Cpp/controls/controls/gridcontrol/article.php/c2179

-- Dan
0

Featured Post

Independent Software Vendors: 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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 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