-#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
- const wxSize sizeBmp = wxArtProvider::GetSizeHint(wxART_BUTTON);
- wxBitmap bmp = GetCloseButtonBitmap(this, sizeBmp, colBg);
-#else // !wxHAS_DRAW_TITLE_BAR_BITMAP
- wxBitmap bmp = wxArtProvider::GetBitmap(wxART_CLOSE, wxART_BUTTON);
-#endif // wxHAS_DRAW_TITLE_BAR_BITMAP
- m_button = new wxBitmapButton
- (
- this,
- wxID_ANY,
- bmp,
- wxDefaultPosition,
- wxDefaultSize,
- wxBORDER_NONE
- );
-
-#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP
- m_button->SetBitmapPressed(
- GetCloseButtonBitmap(this, sizeBmp, colBg, wxCONTROL_PRESSED));
-
- m_button->SetBitmapCurrent(
- GetCloseButtonBitmap(this, sizeBmp, colBg, wxCONTROL_CURRENT));
-#endif // wxHAS_DRAW_TITLE_BAR_BITMAP
-
- m_button->SetBackgroundColour(colBg);