- oldp = (HPEN) SelectObject( (HDC) dc, GetStockObject( NULL_PEN ) ) ;
- oldb = (HBRUSH) SelectObject( (HDC) dc, brushFace ) ;
- Rectangle( (HDC) dc, left, top, right, bottom ) ;
- SelectObject( (HDC) dc, penBorder) ;
+ SelectObject( (HDC) dc, sel? penHiLight : penDkShadow);
+ MoveToEx((HDC) dc, left, bottom-1, NULL); LineTo((HDC) dc, right+2, bottom-1);
+ MoveToEx((HDC) dc, right-1, bottom-2, NULL); LineTo((HDC) dc, right-1, top-1);
+
+ // delete allocated resources
+ SelectObject((HDC) dc,oldp);
+ DeleteObject(penHiLight);
+ DeleteObject(penLight);
+ DeleteObject(penShadow);
+ DeleteObject(penDkShadow);
+ DeleteObject(brushFace);
+}
+
+#else
+
+void wxBitmapButton::DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel )
+{
+ HPEN oldp;
+ HPEN penBorder;
+ HPEN penLight;
+ HPEN penShadow;
+ HBRUSH brushFace;
+
+ // create needed pens and brush
+ penBorder = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_WINDOWFRAME));
+ penShadow = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNSHADOW));
+ penLight = CreatePen(PS_SOLID, 0, GetSysColor(COLOR_BTNHIGHLIGHT));
+ brushFace = CreateSolidBrush(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, penBorder);