Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to show only horizontal grid lines in CListCtrl. i dont want to show vertical grid lines on CListCtrl.How can i achieve this

What I have tried:

I tried LVS_EX_GRIDLINES but it displayed both horizontal and vertical grid lines
Posted
Updated 9-Oct-19 10:46am
Comments
Richard MacCutchan 9-Oct-19 15:52pm    
That is the choice: all or nothing.
Maciej Los 10-Oct-19 3:52am    
My virtual 5!
BTW: You sounds like W. Shakespeare ("To be or not to be").

1 solution

As Richard pointed out, with the standard list view control, you can have both veritcal and horizontal grid lines or NO grid lines at all. However you can customize it (did you ever heard about owner drawn controls?). You may find many many articles on this very topic, here at CodeProject: https://www.codeproject.com/KB/list/#Custom+Draw[^].
 
Share this answer
 
Comments
Maciej Los 10-Oct-19 3:52am    
5ed!
Beginner_mfc 11-Oct-19 3:02am    
I have heard about owner draw,drawitem.onpaint but pretty much confused how to use ..Could you please share code snippet that can help me out

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