void CDC::FillSolidRect(int x, int y, int cx, int cy, COLORREF clr)
{
ASSERT\_VALID(this);
ASSERT(m\_hDC != NULL);
::SetBkColor(m\_hDC, clr);
CRect rect(x, y, x + cx, y + cy);
::ExtTextOut(m\_hDC, 0, 0, ETO\_OPAQUE, &rect, NULL, 0, NULL);
}
void
CDC::Draw3dRect
(LPCRECT lpRect, COLORREF clrTopLeft, COLORREF clrBottomRight)
{
Draw3dRect(lpRect->left, lpRect->top, lpRect->right - lpRect->left,
lpRect->bottom - lpRect->top, clrTopLeft, clrBottomRight);
}
void
CDC::Draw3dRect
(int x,int y, int cx, int cy, COLORREF clrTopLeft, COLORREF clrBottomRight)
{
FillSolidRect(x, y, cx - 1, 1, clrTopLeft);
FillSolidRect(x, y, 1, cy - 1, clrTopLeft);
FillSolidRect(x + cx, y, -1, cy, clrBottomRight);
FillSolidRect(x, y + cy, cx, -1, clrBottomRight);
}