+ // create needed pens and brush
+ penHiLight = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_3DHILIGHT));
+ penLight = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_3DLIGHT));
+ penShadow = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_3DSHADOW));
+ penDkShadow = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_3DDKSHADOW));
+ brushFace = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
+
+ // draw the rectangle
+ RECT rect;
+ rect.left = left;
+ rect.right = right;
+ rect.top = top;
+ rect.bottom = bottom;
+ FillRect((HDC) dc, &rect, brushFace);
+
+ // draw the border
+ oldp = (HPEN) SelectObject( (HDC) dc, sel? penDkShadow : penHiLight);
+ MoveToEx((HDC) dc, left, top, NULL); LineTo((HDC) dc, right-1, top);
+ MoveToEx((HDC) dc, left, top+1, NULL); LineTo((HDC) dc, left, bottom-1);
+
+ SelectObject( (HDC) dc, sel? penShadow : penLight);
+ MoveToEx((HDC) dc, left+1, top+1, NULL); LineTo((HDC) dc, right-2, top+1);
+ MoveToEx((HDC) dc, left+1, top+2, NULL); LineTo((HDC) dc, left+1, bottom-2);