Link to home
Start Free TrialLog in
Avatar of funvill
funvillFlag for Canada

asked on

2 or more checkbox in a CListCtrl

Hello

What I’m trying to do is have a CListCtrl with 3 columns (in report view)
One columns with text, the other two columns with a check box.

thx for your help

Avatar of gelbert
gelbert

You will have to overwriet OnPaint() on CListCtrl to paint checkboxes in two columns. You may be able to find samples at codeproject.cop or codeguru.com

 You will need an Owner Drawn CListCtrl

 He is a sample
 
 http://www.codeguru.com/listview/sel_row.shtml

 During the drawing process you will have to dynmaically add a checkbox to the CListCtrl.

 First determine an ID range for the checkboxes say 0xe000 to 0xf000

 Next, when its time to draw add the checkbox with the CListCtrl as the parent. The CRect cooordinates can be garnered from the OwnerDraw rect. Increment the ID each time you add a Check box.

 Use ON_NOTIFY_RANGE to monitor when a CheckBox has been clicked.

 I don't think there is an example of this around. If this is a solution for you we can help you work through it.







 
Avatar of funvill

ASKER

re: williamcampbell

thats a little over my head.
i tryed for about 1hr and couldn't get any where.
i need an example.

Avatar of funvill

ASKER

re: williamcampbell

thats a little over my head.
i tryed for about 1hr and couldn't get any where.
i need an example.

ASKER CERTIFIED SOLUTION
Avatar of PhilJ1
PhilJ1

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of funvill

ASKER

great just what i wanted thx