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. ScrollBar Limitations

ScrollBar Limitations

Scheduled Pinned Locked Moved C / C++ / MFC
c++asp-nethelpquestion
3 Posts 2 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.
  • P Offline
    P Offline
    paresh_joe
    wrote on last edited by
    #1

    Hi all, right now i am working on a project in which i am using inhouse list component which is using MFC Scrollbar . problem is that when that List is filled with around 40000 records and when i am moving Tracker of and reach to the position "32768" (tracker value) it is getting reset to first position. this is happening beacuse the in the core file "wincore.cpp" (which is actually handling this event) getting parameter wParam (which is UINT ptr) and from this parameter it is actually retrieving Tracker value. wParam can contain max 2147483648 value. when tracker reaches to 32768th row its holding 2147483653 , which is beyond range of integer. Now can anyone tell me whats the solution if i have more than more than 32767 records in a single page , or is there any option in ScrollBar that can handle this situation ? Thank You , Perry

    R 1 Reply Last reply
    0
    • P paresh_joe

      Hi all, right now i am working on a project in which i am using inhouse list component which is using MFC Scrollbar . problem is that when that List is filled with around 40000 records and when i am moving Tracker of and reach to the position "32768" (tracker value) it is getting reset to first position. this is happening beacuse the in the core file "wincore.cpp" (which is actually handling this event) getting parameter wParam (which is UINT ptr) and from this parameter it is actually retrieving Tracker value. wParam can contain max 2147483648 value. when tracker reaches to 32768th row its holding 2147483653 , which is beyond range of integer. Now can anyone tell me whats the solution if i have more than more than 32767 records in a single page , or is there any option in ScrollBar that can handle this situation ? Thank You , Perry

      R Offline
      R Offline
      Roger Broomfield
      wrote on last edited by
      #2

      Extract from http://msdn2.microsoft.com/en-us/library/z91cdf5a(VS.80).aspx[^] The MFC Windows message handlers that indicate scroll bar position, CWnd::OnHScroll and CWnd::OnVScroll, provide only 16 bits of position data. GetScrollInfo and SetScrollInfo provide 32 bits of scroll bar position data. Thus, an application can call GetScrollInfo while processing either CWnd::OnHScroll or CWnd::OnVScroll to obtain 32-bit scroll bar position data.

      P 1 Reply Last reply
      0
      • R Roger Broomfield

        Extract from http://msdn2.microsoft.com/en-us/library/z91cdf5a(VS.80).aspx[^] The MFC Windows message handlers that indicate scroll bar position, CWnd::OnHScroll and CWnd::OnVScroll, provide only 16 bits of position data. GetScrollInfo and SetScrollInfo provide 32 bits of scroll bar position data. Thus, an application can call GetScrollInfo while processing either CWnd::OnHScroll or CWnd::OnVScroll to obtain 32-bit scroll bar position data.

        P Offline
        P Offline
        paresh_joe
        wrote on last edited by
        #3

        Thank you Roger .. Hope this will work ...:)

        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