- if (!m_selectedBitmap.Ok())
- {
- *width = 0; *height = 0;
- return;
- }
- *width = m_selectedBitmap.GetWidth();
- *height = m_selectedBitmap.GetHeight();
+ wxBrush brush(dc.GetBrush());
+ wxPen pen(dc.GetPen());
+ if (brush.IsOk() && brush.GetStyle() != wxTRANSPARENT)
+ {
+ HBRUSH hBrush = (HBRUSH) brush.GetResourceHandle() ;
+ if (hBrush)
+ {
+ RECT rect;
+ rect.left = x; rect.top = y;
+ rect.right = x + width - 1;
+ rect.bottom = y + height - 1;
+ ::FillRect((HDC) dc.GetHDC(), &rect, hBrush);
+ }
+ }
+ width --; height --;
+ if (pen.IsOk() && pen.GetStyle() != wxTRANSPARENT)
+ {
+ dc.DrawLine(x, y, x + width, y);
+ dc.DrawLine(x, y, x, y + height);
+ dc.DrawLine(x, y+height, x+width, y + height);
+ dc.DrawLine(x+width, y+height, x+width, y);
+ }