15,980
社区成员




BOOL CUIDlg::OnEraseBkgnd(CDC* pDC)
{
if (bHighlight)
{
pDC->FillSolidRect(CRect(49, 299, 225, 313), RGB(214, 42, 42));
pDC->SetTextColor(RGB(255 ,255, 255));
CString temp;
temp = statesText;
pDC->DrawText(temp, CRect(49 + textCount * 5, 299, 225, 313), DT_LEFT | DT_VCENTER | DT_SINGLELINE);
}
if (prevPointCount != pointCount)
{
DrawPoint((pointCount == 1) ? TRUE : FALSE, CRect(POINT_RECT(135, 320)), pDC);
DrawPoint((pointCount == 2) ? TRUE : FALSE, CRect(POINT_RECT(145, 320)), pDC);
DrawPoint((pointCount == 3) ? TRUE : FALSE, CRect(POINT_RECT(155, 320)), pDC);
DrawPoint((pointCount == 4) ? TRUE : FALSE, CRect(POINT_RECT(165, 320)), pDC);
DrawPoint((pointCount == 5) ? TRUE : FALSE, CRect(POINT_RECT(175, 320)), pDC);
DrawPoint((pointCount == 6) ? TRUE : FALSE, CRect(POINT_RECT(185, 320)), pDC);
DrawPoint((pointCount == 7) ? TRUE : FALSE, CRect(POINT_RECT(195, 320)), pDC);
DrawPoint((pointCount == 8) ? TRUE : FALSE, CRect(POINT_RECT(205, 320)), pDC);
DrawPoint((pointCount == 9) ? TRUE : FALSE, CRect(POINT_RECT(215, 320)), pDC);
prevPointCount = pointCount;
}
else
{
CBrush m_brushBackground;
m_brushBackground.CreatePatternBrush(&backgroud);
CRect rect;
GetClientRect(&rect);
pDC->FillRect(rect,&m_brushBackground);
}
// CDialog::OnEraseBkgnd(pDC);
return TRUE;
}