32-Bit Scroll Ranges

Last reviewed: November 2, 1995
Article ID: Q104311
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT versions 3.1 and 3.5
    

You can use 32-bit scroll ranges by calling GetScrollPos(); however, you cannot get 32-bit positions for notifications sent while thumb tracking, that is, via the SB_THUMBPOSITION message. This is because thumb position information is not queryable via an application programming interface (API). You only can obtain the 32-bit scroll information only before or after the scroll has taken place.

The scroll bar APIs allow setting a scroll range up to 0x7FFFFFFF via SetScrollRange(), and setting a scroll position within that range using SetScrollPos(). If the WM_HSCROLL or WM_VSCROLL message is processed, the information returned for scroll bar position, nPos, is only a 16-bit value. To obtain the 32-bit information, the GetScrollPos() API must be used.


Additional reference words: 3.10 3.50 scrollbar
KBCategory: kbui
KBSubcategory: UsrCtl


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.