CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2009
    Posts
    27

    MFC: Invisible Scroll

    Dear experts,

    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.

  2. #2
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: MFC: Invisible Scroll

    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:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  3. #3
    Join Date
    Aug 2009
    Posts
    27

    Re: MFC: Invisible Scroll

    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.

  4. #4
    Join Date
    Aug 2000
    Location
    New York, NY, USA
    Posts
    5,656

    Re: MFC: Invisible Scroll

    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:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  5. #5
    Join Date
    Aug 2009
    Posts
    27

    Re: MFC: Invisible Scroll

    Quote Originally Posted by VladimirF View Post
    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);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured