msgs12.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WM_VSCROLL (1.2)
Message Group  Overview                           Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINMESSAGEMGR
 
WM_VSCROLL
id = SHORT1FROMMP(mp1);       /* control-window ID */
sPos = SHORT1FROMMP(mp2);     /* slider position   */
usCmd = SHORT2FROMMP(mp2);    /* command           */
 
The WM_VSCROLL message is posted to the owner of a vertical scroll-bar
window when an event occurs.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
id         Low word of mp1. Identifies the scroll-bar window.
 
sPos       Low word of mp2. When usCmd is SB_SLIDERPOSITION or
           SB_SLIDERTRACK, it specifies the slider position. If usCmd is
           SB_ENDSCROLL, sPos is TRUE if the pointer was inside the scroll
           bar or FALSE if the pointer was outside. The sPos parameter is
           zero for all other usCmd values.
 
usCmd      High word of mp2. Specifies the type of command. This parameter
           can be one of the following values:
 
           Value              Meaning
           ─────────────────────────────────────────────────────────────────
           SB_LINEUP          The user clicked the scroll-bar up arrow or
                              pressed the VK_UP key.
 
           SB_LINEDOWN        The user clicked the scroll-bar down arrow or
                              pressed the VK_DOWN key.
 
           SB_PAGEUP          The user clicked the area above the slider or
                              pressed the VK_PAGEUP key.
 
           SB_PAGEDOWN        The user clicked the area below the slider or
                              pressed the VK_PAGEDOWN key.
 
           SB_SLIDERPOSITION  The sPos parameter contains the final position
                              of the slider.
 
           SB_SLIDERTRACK     The user is dragging the slider. This value is
                              sent whenever the slider position changes.
 
           SB_ENDSCROLL       The user has finished scrolling. This value is
                              set only if the user was not doing an absolute
                              slider movement.
 
Return Value
 
An application should return zero if it processes this message.
 
See Also
 
WM_HSCROLL, WM_VSCROLLCLIPBOARD
 
                                      ♦