Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Auto Scroll

Auto Scroll

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    arunforce
    wrote on last edited by
    #1

    I have a list box, but I need it to auto scroll down, because everytime a message is posted, the box just stay where it is. I could have like 10 messages posted, but it would only show the first 5... Help me please, make it simple for me to understand I'm new to MFC. Thanks ALOT! Arun

    R M 2 Replies Last reply
    0
    • A arunforce

      I have a list box, but I need it to auto scroll down, because everytime a message is posted, the box just stay where it is. I could have like 10 messages posted, but it would only show the first 5... Help me please, make it simple for me to understand I'm new to MFC. Thanks ALOT! Arun

      R Offline
      R Offline
      Ravi Bhavnani
      wrote on last edited by
      #2

      You may want to consider using a CListCtrl instead of a CListBox. That way you could call its EnsureVisible() method to scroll a specific row into view. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

      A 1 Reply Last reply
      0
      • R Ravi Bhavnani

        You may want to consider using a CListCtrl instead of a CListBox. That way you could call its EnsureVisible() method to scroll a specific row into view. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

        A Offline
        A Offline
        arunforce
        wrote on last edited by
        #3

        I didn't understand half the things you said. Could you simplify it. I already coded most of it, and it would break my heart to recode it. :( I just want it simply to autoscroll down :( Please help me.

        1 Reply Last reply
        0
        • A arunforce

          I have a list box, but I need it to auto scroll down, because everytime a message is posted, the box just stay where it is. I could have like 10 messages posted, but it would only show the first 5... Help me please, make it simple for me to understand I'm new to MFC. Thanks ALOT! Arun

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          Use CListBox::SetTopIndex() to scroll it. You can pass GetItemCount()-1 to have it scroll as far down as possible. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- You cannot truly appreciate Dilbert unless you've read it in the original Klingon.

          A 1 Reply Last reply
          0
          • M Michael Dunn

            Use CListBox::SetTopIndex() to scroll it. You can pass GetItemCount()-1 to have it scroll as far down as possible. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- You cannot truly appreciate Dilbert unless you've read it in the original Klingon.

            A Offline
            A Offline
            arunforce
            wrote on last edited by
            #5

            I could only make it CListBox::SetTopIndex, without the (). And I couldn't even add the GetItemCount()-1 Even the CListBox::SetTopIndex didnt work... What do I do?

            B 1 Reply Last reply
            0
            • A arunforce

              I could only make it CListBox::SetTopIndex, without the (). And I couldn't even add the GetItemCount()-1 Even the CListBox::SetTopIndex didnt work... What do I do?

              B Offline
              B Offline
              bikram singh
              wrote on last edited by
              #6

              You can post your code for starters.... Bikram Singh

              A 1 Reply Last reply
              0
              • B bikram singh

                You can post your code for starters.... Bikram Singh

                A Offline
                A Offline
                arunforce
                wrote on last edited by
                #7

                I rather not, (i'm making a game (closed source)) I just want a normal everyday listbox to scroll down everytime a message is put into it :( Any ideas?

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups