WM_HSCROLL (Trackbar) notification code

The WM_HSCROLL message is sent to the owner of a horizontal trackbar control when the slider changes position.

A window receives this message through its WindowProc function.


WM_HSCROLL

    WPARAM wParam
    LPARAM lParam; 

Parameters

wParam

The HIWORD specifies the current position of the slider if the LOWORD is TB_THUMBPOSITION or TB_THUMBTRACK. For all other notification codes, the high-order word is zero; send the TBM_GETPOS message to determine the slider position.

The LOWORD specifies a notification code that indicates the user's interaction with the trackbar. This word can be one of the following values.

ValueMeaning
TB_BOTTOM

The user pressed the END key (VK_END).

TB_ENDTRACK

The trackbar received WM_KEYUP, meaning that the user released a key that sent a relevant virtual key code.

TB_LINEDOWN

The user pressed the RIGHT ARROW (VK_RIGHT) or DOWN ARROW (VK_DOWN) key.

TB_LINEUP

The user pressed the LEFT ARROW (VK_LEFT) or UP ARROW (VK_UP) key.

TB_PAGEDOWN

The user clicked the channel below or to the right of the slider (VK_NEXT).

TB_PAGEUP

The user clicked the channel above or to the left of the slider (VK_PRIOR).

TB_THUMBPOSITION

The trackbar received WM_LBUTTONUP following a TB_THUMBTRACK notification code.

TB_THUMBTRACK

The user dragged the slider.

TB_TOP

The user pressed the HOME key (VK_HOME).

 

lParam

The handle to the trackbar control.

Return value

If an application processes this message, it should return zero.

Remarks

The TB_THUMBTRACK code is typically used by applications that provide feedback as the user drags the scroll box.

Note that the WM_HSCROLL message carries only 16 bits of position data. Thus, applications that rely solely on WM_HSCROLL (and WM_VSCROLL) for slider position data have a practical maximum position value of 65,535.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

See also

Reference
WM_VSCROLL

 

 

Community Additions

ADD
Show:
© 2014 Microsoft