I'm want to make a flat design ComboBox which only shows a blue bottom border. But I can only change 4 borders' color. How to hide right,left and top border and show bottom border?
CodePudding user response:
Finally I made it. Just rewrite OnPaint()
function and use CDC::DrawEdge(CRect, BDR_RAISEDINNER, BF_BOTTOM)
to drwa a bottom border.
void CCustomComboBox::OnPaint()
{
CPaintDC dc(this);
CRect rc;
GetClientRect(&rc);
dc.DrawEdge(rc, BDR_RAISEDINNER, BF_BOTTOM);
... //draw other parts of ComboBox
}