C + + scrolling issues with scroll bars

Source: Internet
Author: User

&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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.