CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    MFC. CListBox. SetScrollPos does not work after ResetContent

    Code:
        int nPos = ListBox.GetScrollPos(SB_VERT);
        ListBox.ResetContent();
        // Fill content
        // ....
        ListBox.SetScrollPos(SB_VERT, nPos);
    ScrollBar rectangle looks good but content showed from the beginning.
    Last edited by user008; August 28th, 2013 at 04:32 AM.

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: MFC. CListBox. SetScrollPos does not work after ResetContent

    Try to use CListBox::SetTopIndex
    See the example in this thread.
    Victor Nijegorodov

  3. #3
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    69

    Re: MFC. CListBox. SetScrollPos does not work after ResetContent

    Thanks!

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