MFC. CListBox. SetScrollPos does not work after ResetContent
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

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

  1. #1
    Join Date
    Oct 2010
    Location
    Russia
    Posts
    67

    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 online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,285

    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
    67

    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
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center