Home > Software engineering >  MFC in initial position center slider
MFC in initial position center slider

Time:09-27

Want the slider to the initial position of the center, the code is as follows:
M_hangxiang. SetRange (127127);
M_hangxiang. SetPos (0);
M_fuyang. SetRange (127127);
M_fuyang. SetPos (0);
But after the operation is located in the left


For this is how to return a responsibility?

CodePudding user response:

M_Slider4. SetRange (- 127, + 127, TRUE);
M_Slider4. SetPos (0);

CodePudding user response:

 Sets the range (minimum and maximum positions) for the slider in a slider control. 


Void SetRange (
Int nMin,
Int nMax,
BOOL bRedraw=FALSE
);


The Collapse imageParameters
NMin
Minimum position for the slider.

NMax
The 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.
  • Related