void SliderBoth::SetBlockColor() CClientDC dc(this); CRect rc; GetClientRect(&rc); int iNumTic=(pos.iMax-pos.iMin)/pos.iTick; const int iL=MARGIN_SLIDE; const int iR=rc.right-MARGIN_SLIDE; const double dbStep=(iR-iL)*1.0/iNumTic; double db=iL; CBrush brush; brush.CreateSolidBrush(RGB(165,196,211)); CBrush * pOldBrush= dc.SelectObject (&brush); dc.Rectangle((int)lval+MARGIN_SLIDE*2,rc.top+1,(int)rval,rc.bottom-MARGIN_SLIDE*2); dc.SelectObject (pOldBrush); brush.DeleteObject(); #endif }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)