The framework calls this member function when the user clicks a window's horizontal scroll bar.  
afx_msg void OnHScroll(
   UINT nSBCode,
   UINT nPos,
   CScrollBar* pScrollBar 
);
 Parameters
nSBCode
Specifies a scroll-bar code that indicates the user's scrolling request. This parameter can be one of the following: SB_LEFT   Scroll to far left. SB_ENDSCROLL   End scroll. SB_LINELEFT   Scroll left. SB_LINERIGHT   Scroll right. SB_PAGELEFT   Scroll one page left. SB_PAGERIGHT   Scroll one page right. SB_RIGHT   Scroll to far right. SB_THUMBPOSITION   Scroll to absolute position. The current position is specified by the nPos parameter. SB_THUMBTRACK   Drag scroll box to specified position. The current position is specified by the nPos parameter. nPos
Specifies the scroll-box position if the scroll-bar code is SB_THUMBPOSITION or SB_THUMBTRACK; otherwise, not used. Depending on the initial scroll range, nPos may be negative and should be cast to an int if necessary. pScrollBar
If the scroll message came from a scroll-bar control, contains a pointer to the control. If the user clicked a window's scroll bar, this parameter is NULL. The pointer may be temporary and should not be stored for later use.