How to solve the problem that the maximum scroll value of a scroll bar in VC cannot exceed 32767

Source: Internet
Author: User
Reference Article: Http://www.docin.com/p-65394443.html

Specifically, NPOs variables in onhscroll are not used.

Instead, use the ntrackpos variable in scrollinfo.

The reason is that NPOs is a uint type and the maximum value is 32767. If it is larger, It is a negative value.

The ntrackpos type is int and has a large range.

However, generally speaking, uint must be larger than int in the positive value range. I don't know why, is it Microsoft's aim to be compatible with 16-bit machines?

Scrollinfo;

M_ctlscrollh.getscrollinfo (& scrollinfo, sif_all );

M_ctlscrollh.setscrollpos (scrollinfo. ntrackpos );

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.