<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