Set the range of values for a slider control control

Source: Internet
Author: User

<span style= "White-space:pre" ></span>int m_stransvalue; CSliderCtrl m_ctrltransparency;

Where M_stransvalue is the variable associated with the Slider control control

M_ctrltransparency as a slider control control variable


To set the scope of a control in OnInitDialog ():

<span style= "White-space:pre" ></span>//set the range of the slider control HWND HSlider = (hwnd) m_ctrltransparency;::sendmessage (HSlider, Tbm_setrange, 1, Makelong (0,255));
Makelong (A, B) indicates the scope of the control


Note UpdateData () is required when m_stransvalue or assigning a variable to a control association.

Add:


SendMessage (HSlider, Tbm_setpos, 1, 10);
you can set the default value for the control, where 10 refers to setting the default value

Try:

1. The maximum and minimum values are also set for the Control association variable M_stransvalue

2. Set the maximum and minimum values by SetScrollRange ()

But the discovery is ineffective.

Set the range of values for a slider control control

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.