]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/checkbox.cpp
Already had wxEVT_MOUSE_CAPTURE_CHANGED, don't need it twice
[wxWidgets.git] / src / univ / checkbox.cpp
index 295756acd0d7a1f944a98027b02a44862943c8e8..c15ebca4bab3c657d6dfbc55170643ca6310cf6e 100644 (file)
@@ -70,6 +70,8 @@ bool wxCheckBox::Create(wxWindow *parent,
     if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
         return FALSE;
 
+    m_hasDialogBackground = TRUE;
+
     SetLabel(label);
     SetBestSize(size);
 
@@ -154,10 +156,12 @@ void wxCheckBox::DoDraw(wxControlRenderer *renderer)
     if ( m_status == Status_Checked )
         flags |= wxCONTROL_CHECKED;
 
+    wxBitmap bitmap(GetBitmap(GetState(flags), m_status));
+
     renderer->GetRenderer()->
         DrawCheckButton(dc,
                         GetLabel(),
-                        GetBitmap(GetState(flags), m_status),
+                        bitmap,
                         renderer->GetRect(),
                         flags,
                         GetWindowStyle() & wxALIGN_RIGHT ? wxALIGN_RIGHT