Vertical Scrollbar in CListCtrl

前端 未结 4 1521
忘了有多久
忘了有多久 2021-01-26 22:51

I\'m using a CListCtrl in Icon view, but it scrolls horizontally:

1 3 5 7 -->
2 4 6 8 -->

I\'d rather it scroll horizontally:

<         


        
4条回答
  •  时光取名叫无心
    2021-01-26 23:28

    In list control,to display content with image in single column with vertical scrollbar .add following code, In PreCreateWindow function,add following line cs.style |= (LVS_REPORT|LVS_NOCOLUMNHEADER); and in OnIntialUpdate function add following line, fileList.InsertColumn(0," ",LVCFMT_LEFT|LVCFMT_IMAGE,120,-1); ShowScrollBar(SB_VERT,1); after this,whereever you want to insert data in list you can but take care that you set imagelist and then insert data using insertitem eg: fileList,insertitem(0,"India",1); where 1-> is index of image in imagelist.

提交回复
热议问题