&Scrollinfo, sif_all); Switch (nsbcode) { case sb_lineright: if (Scrollinfo.npos < Scrollinfo.nmax) { ten; &scrollinfo); ScrollWindow (-0);} Break ;}
Use Getscrollinfo to get scrolling information to save information in the SCROLLINFO class of data
Then according to the Nsbcode to determine which scroll bar which action, did the adjustment
The related functions of scrolling are listed below
void OnHScroll ( uint Nsbcode, uint NPos, cscrollbar* pscrollbar );
The meaning of each parameter:
Nsbcode
Specifies the scroll bar code that indicates the user scrolls the request. This parameter can be one of the following values:
Sb_left Scroll to the far left.
Sb_endscroll end scrolling.
Sb_lineleft scrolling.
Sb_lineright scrolling permissions.
Sb_pageleft Scrolls one page.
Sb_pageright scroll one page permission.
Sb_right Scroll to the far right.
Sb_thumbposition is the absolute position of the scroll. The current position is determined byNPosparameter is specified.
Sb_thumbtrack Drag the scroll box to the specified position. The current position is determined byNPosparameter is specified.
NPos
Specifies the scroll box position if the scroll bar code is sb_thumbposition or sb_thumbtrack; otherwise, it is not used. Based on the initial scrolling size, the NPos can be negative, so if necessary, convert to int.
Pscrollbar
If the scrolling message comes fromscroll bar controlthat contains a pointer to the control. If you are adding a scrolling control manually
If the user clicks the window scroll bar, this parameter is NULL.
The pointer may be transient and should not be stored for future use.
C + + scrolling issues with scroll bars