Solved

Adding checkboxes to a Clistctrl

Posted on 2004-04-11
2
365 Views
Last Modified: 2013-11-20
Hi Experts,

In my application I want each row in the first column of my listctrl to contain a single checkbox.  I've trawled the net and looked at a couple of articles on codeproject but can't seem to get the checkboxes to appear.  I would prefer to avoid custom painting the clistctrl but can do if thats the only solution.  

Any help would be much appreciated

Thanks in advance

Stuart
0
Comment
Question by:csuog
  • 2
2 Comments
 
LVL 4

Expert Comment

by:caner_elci
ID: 10801123
You'll need to set the extended style LVS_EX_CHECKBOXES to have checkboxes.. then, you can use GetCheck() and SetCheck() to get the check state of an item..
0
 
LVL 4

Accepted Solution

by:
caner_elci earned 100 total points
ID: 10801144
Here is the code :

m_wndList1.GetListCtrl().SetExtendedStyle( m_wndList1.GetListCtrl().GetExtendedStyle() | LVS_EX_CHECKBOXES );
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 106
maven archtype selection in eclipse 1 51
Fibonacci challenge 11 82
Annoying "thing" blocks my view 4 50
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

708 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

10 Experts available now in Live!

Get 1:1 Help Now