I am trying to coloring thumbs on CScrollBar control ... in order to achieve that, I derived a class from CScrollBar, named CScrollbarExt, and I handled CtlColor:
Code:
protected:
//{{AFX_MSG(CScrollBarExt)
afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
//}}AFX_MSG
and
Code:
HBRUSH CScrollBarExt::CtlColor(CDC* pDC, UINT nCtlColor)
{
// TODO: Change any attributes of the DC here
// TODO: Return a non-NULL brush if the parent's handler should not be called
return m_Brush;
return NULL;
}
of course, m_Brush has a custom color, and scrollbar shaft has custom color ... but how can I draw thumbs of this CScrollBar object ? What can I do for that ?
I attach a little sample project to illustrate the issue ...