+wxBitmap MyStatusBar::CreateBitmapForButton(bool on)
+{
+ static const int BMP_BUTTON_SIZE_X = 10;
+ static const int BMP_BUTTON_SIZE_Y = 9;
+
+ wxBitmap bitmap(BMP_BUTTON_SIZE_X, BMP_BUTTON_SIZE_Y);
+ wxMemoryDC dc;
+ dc.SelectObject(bitmap);
+ dc.SetBrush(on ? *wxGREEN_BRUSH : *wxRED_BRUSH);
+ dc.SetBackground(*wxLIGHT_GREY_BRUSH);
+ dc.Clear();
+ dc.DrawEllipse(0, 0, BMP_BUTTON_SIZE_X, BMP_BUTTON_SIZE_Y);
+ dc.SelectObject(wxNullBitmap);
+
+ return bitmap;
+}
+