1.8.4 Processing Scroll Messages

A window that permits scrolling needs a standard scroll bar or a scroll-bar control to let the user generate scrolling requests, and a window function to process the WM_HSCROLL and WM_VSCROLL messages that represent the scrolling requests. Although the result of a scrolling request is entirely up to the window, a window typically carries out a scroll by moving in some direction from the current location or to a known beginning or end, and by displaying the data at the new location. For example, a word-processing application can scroll to the next line, the next page, or to the end of the document.