I am having problem in setting the background color of a SysLink Control.
I have a group box and also couple of SysLink Controls. When I change the back color of group box and also the syslink control, this is what it looks like...
A small white color line appears at the end. It doesn't go even after adjusting the width of the control.
Here is my code:
HBRUSH PanelDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
pDC->SetBkColor(RGB(0, 0, 255));//RGB(223, 233, 247)
pDC->SetTextColor(RGB(0, 0, 0));
return (HBRUSH)GetStockObject(NULL_BRUSH);
}
and OnPaint...
void PanelDlg::OnPaint()
{
CRect rect1;
GetDlgItem(IDC_MENU_GROUP_BOX)->GetWindowRect(&rect1);
ScreenToClient(&rect1);
CPaintDC dc(this);
dc.FillSolidRect(&rect1, RGB(0, 0, 255));// RGB(223, 233, 247)); //247
CDialogEx::OnPaint();
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.