+ if ( !m_brushDisabled.Ok() )
+ {
+ // draw a bitmap with two black and two background colour pixels
+ wxBitmap bmp(2, 2);
+ wxMemoryDC dc;
+ dc.SelectObject(bmp);
+ dc.SetPen(*wxBLACK_PEN);
+ dc.DrawPoint(0, 0);
+ dc.DrawPoint(1, 1);
+ dc.SetPen(GetBackgroundColour());
+ dc.DrawPoint(0, 1);
+ dc.DrawPoint(1, 0);
+
+ m_brushDisabled = wxBrush(bmp);
+ }
+
+ SelectInHDC selectBrush((HDC)dc, GetHbrushOf(m_brushDisabled));