Click here to Skip to main content
14,333,806 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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[^].
   
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, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100