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. Windows API
  4. Scrolling the screen

Scrolling the screen

Scheduled Pinned Locked Moved Windows API
c++question
5 Posts 2 Posters 15 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
    Anthony Appleyard
    wrote on last edited by
    #1

    Please what is the Visual C++ statement to make all the current window, or a specified area of the current window, scroll n pixels up or down? This is in handling the condition "case SB_THUMBTRACK:" that arises in handling a vertical scrollbar.

    L 1 Reply Last reply
    0
    • A Anthony Appleyard

      Please what is the Visual C++ statement to make all the current window, or a specified area of the current window, scroll n pixels up or down? This is in handling the condition "case SB_THUMBTRACK:" that arises in handling a vertical scrollbar.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      There is no single statement. Scrolling is all about drawing the contents of your window, or other control, based on the logical position of your scroll bar. See http://msdn.microsoft.com/en-us/library/windows/desktop/bb787529(v=vs.85).aspx[^] for details of implementation.

      A 1 Reply Last reply
      0
      • L Lost User

        There is no single statement. Scrolling is all about drawing the contents of your window, or other control, based on the logical position of your scroll bar. See http://msdn.microsoft.com/en-us/library/windows/desktop/bb787529(v=vs.85).aspx[^] for details of implementation.

        A Offline
        A Offline
        Anthony Appleyard
        wrote on last edited by
        #3

        If the screen window displays text, if the vertical bar's thumb is moved down a bit, so that the text on the window must be displayed n pixels higher, then it is quickest to scroll the window's existing contents up by n pixels, then I must rewrite only the bottom n rows of pixels. So please how, in a given screen area, to move every pixel upwards by n pixels?

        L 1 Reply Last reply
        0
        • A Anthony Appleyard

          If the screen window displays text, if the vertical bar's thumb is moved down a bit, so that the text on the window must be displayed n pixels higher, then it is quickest to scroll the window's existing contents up by n pixels, then I must rewrite only the bottom n rows of pixels. So please how, in a given screen area, to move every pixel upwards by n pixels?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You should use the ScrollWindow[^] function, based on the information returned by the scroll notifications.

          A 1 Reply Last reply
          0
          • L Lost User

            You should use the ScrollWindow[^] function, based on the information returned by the scroll notifications.

            A Offline
            A Offline
            Anthony Appleyard
            wrote on last edited by
            #5

            Thanks.

            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