Click here to Skip to main content
15,914,359 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to win32. I want to learn how to create owner draw listbox with check boxes without using mfc.
Please provide me some links or sample codes.

Thanks in advance.
Posted
Updated 5-May-11 21:14pm
v4

The native treeview will support this - change its style to set TVS_CHECKBOXES after you've created or attached to it - if you don't add any children, it's effectively a listbox

You then need to watch for an NM_CLICK in the parent of the listbox, and use TreeView_HitTest and TreeView_GetCheckState macros in the parent notification procedure to work out which checkbox got hit

if you're new to win32 it's going to be challenging ...
 
Share this answer
 
v2
Check this,
Check It Out, A Simple Win32 SDK Checked Listbox and Combobox[^]

Still, There are lot of articles in the codeproject.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 6-May-11 2:40am    
Nice one, my 5.
--SA
ngandhi 11-May-11 0:52am    
Hey This link is good but I have to add string in the listbox at runtime..then what to do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900