I have a ListBox. I would like to show line numbers of all items in it. I am thinking of adding another Listbox containing only numbers and synchronize it with the main ListBox. But is there a way not to show any scroll in the additional ListBox, and still make its contents move synchronously with the main ListBox's scroll? Thanks.
You will be better off with a two-column list view control.
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
No, I tried CListCtrl. First of all, it has string length limitation of max 260 characters. Also, as I have long strings, when I scrolled to the right, the numbers on the left where not seen.
If you just want to hide the scroll bar, call CWnd’s function ShowScrollBar().
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio: FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...
If you just want to hide the scroll bar, call CWnd’s function ShowScrollBar().
Thank you for your answer. But because of some reason, I still see both vertical and horizontal scrollbars after I added this:
m_lstOldData.ShowScrollBar(SB_VERT, FALSE);
Bookmarks