Home > Software engineering >  I wanted to know vs slider can change the size of the slider controls
I wanted to know vs slider can change the size of the slider controls

Time:09-18

I wanted to know vs slider can change the size of the slider controls

CodePudding user response:

Custom painting
GetThumbRect (& amp; RCT); 11//(L, T 2, R, 28, 34 B)
RCT. DeflateRect (0, (RCT. Height () - RCT. Width ())/2);
CRgn RGN.
RGN. CreateEllipticRgnIndirect (& amp; RCT);
MemDC. FillRgn (& amp; RGN, & amp; BRR);

CodePudding user response:

SCROLLINFO si;
Si. CbSize=sizeof (SCROLLINFO);
Si. FMask=SIF_PAGE | SIF_RANGE;
Si. NPage=(m_nHScrollMax & gt; 0)? VisibleRect. Width () : 0;//can be changed by setting the parameter block size
Si. NMin=0;
Si. NMax=m_nHScrollMax;
SetScrollInfo (SB_HORZ, & amp; Si, TRUE);

CodePudding user response:

Width can't change, can be highly,

CodePudding user response:

Need a custom painting the slider controls, inherit the slider base class, rewrite the function inside, you can set the slider according to size and response area size, https://download.csdn.net/download/ohantanyanying/7408817

CodePudding user response:

Can,

Really need a few words?
  • Related