OWLNext 7.0
Borland's Object Windows Library for the modern age
|
When the user moves a scroll bar's thumb or clicks the scroll arrows, Windows sends a scroll bar notification message to the parent window.
If you want your window to respond to scrolling events, respond to the notification messages. Scroll bar notification messages are slightly different from other control notification messages. They're based on the WM_HSCROLL and WM_VSCROLL messages, rather than WM_COMMAND command messages. Therefore, to respond to scroll bar notification messages, you need to define EvHScroll or EvVScroll event response functions, depending on whether the scroll bar is horizontal or vertical, as shown in the following example:
Usually, you respond to all the scroll bar notification messages by retrieving the current thumb position and taking appropriate action. In that case, you can ignore the notification code, as shown in the following example: