Вопрос

I got here to ask this question because none of the solutions I've found satisfied me or even worked. My problem is pretty straightforward.

I have a CListCtrl in C++ with a lot of columns. They don't fit to the width of the list, so I have to add a horizontal scroll bar.

I tried with EnableScrollbar, ShowScrollBar, SetScrollPos, but none of them worked. How do I create a horizontal scrollbar and show it properly?

Это было полезно?

Решение

If you are using the LVS_REPORT style it should just add the scrollbar for you (as long as the columns exceed the width of the ListCtrl). No special trickery needed.

Is it possible that your CListCtrl is sized bigger than it's container window and therefore not adding a scrollbar? If it's still not working please add a screenshot to your question.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top