WM_HSCROLL

This message is sent when the user clicks the horizontal scroll bar.

Parameter Description  

wParam Contains a scroll-bar code that specifies the user's scrolling request. It can be any one of the following values:  
Parameter Description  

  Value Meaning
  SB_BOTTOM Scroll to lower right.
  SB_ENDSCROLL End scroll.
  SB_LINEDOWN Scroll one line down.
  SB_LINEUP Scroll one line up.
  SB_PAGEDOWN Scroll one page down.
  SB_PAGEUP Scroll one page up.
  SB_THUMBPOSITION Scroll to absolute position. The current position is provided in the low-order word of lParam.
  SB_THUMBTRACK Drag thumb to specified position. The current position is provided in the low-order word of lParam.
  SB_TOP Scroll to upper left.
lParam Specifies the window handle of the control. If the message is sent by a scroll-bar control, the high-order word of the lParam parameter contains the window handle of the control. If the message is sent as a result of the user clicking a pop-up window's scroll bar, the high-order word is not used.  

Comments

The SB_THUMBTRACK message typically is used by applications that give some feedback while the thumb is being dragged.

If an application scrolls the document in the window, it must also reset the position of the thumb by using the SetScrollPos function.