MFC中SliderCtrl控件中SetRange为负数范围时候,必须第三个参数为TRUE

m_slider_frontAgl_.SetRange(-180, 180, TRUE);

MFC中SliderCtrl控件中SetRange为负数范围时候,必须第三个参数为TRUE

否则setPos初始化失败

void SetRange( int nMin, int nMax, BOOL bRedraw = FALSE );
Parameters
nMin
Minimum position for the slider.
nMax
Maximum position for the slider.
bRedraw
The redraw flag. If this parameter is TRUE, the slider is redrawn after the range is set; otherwise the slider is not redrawn

原文地址:https://www.cnblogs.com/XiHua/p/14183500.html