If the scroll range exceeds 32K when you are using the Scroll Thumb to scroll, CScrollView does not handle scrolling correctly. Unusual behavior occurs when you try to scroll beyond 32K.
This behavior is by design. The code to handle ranges greater than 32K was not added to CScrollView because it could fail if a WM_xSCROLL message is sent to the view to programatically scroll the contents. In Visual C++, version 6.0 on Windows NT, the limit has been extended to 2 gigabytes.
You can work around the problem easily by adding support to handle scroll ranges greater than 32K to a CScrollView derived class. Override the function as follows:
return CScrollView::OnScroll(nScrollCode, nPos, bDoScroll);
NOTE: If you are trying to programatically scroll the contents in CscrollView, use the SetScrollInfo to correctly set the scroll bar information and then send or post the WM_xSCROLL message.
NOTE: Windows 98, Windows 95 and Win32s only support logical and device coordinates up to 32K. Because CScrollView uses logical units in SetScrollSizes(), you should specify a scroll range < 32K on when using CSrollView derived classes on these operating systems.
(c) Microsoft Corporation 1997, All Rights Reserved. Contributions by Sridhar S. Madhugiri, Microsoft Corporation
Additional query words: CScrollView scrolling
Keywords : kbprg kbusage kbMFC KbUIDesign kbVC kbVC400 kbVC410 kbVC420 kbVC500 kbVC600
Version : 4.0 4.1 4.2 5.0 6.0
Platform : NT WINDOWS
Issue type : kbprb