]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/checkbox.cpp
Implement wxChoice::Insert.
[wxWidgets.git] / src / msw / checkbox.cpp
index 1734a9b214b700100ea147354a0ebd4b0321f64a..cd9dd38df8b3385a730953902ac946c0d6b9419e 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "checkbox.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -374,6 +370,12 @@ void wxCheckBox::MakeOwnerDrawn(bool ownerDrawn)
     }
 
     ::SetWindowLong(GetHwnd(), GWL_STYLE, style);
+
+    if ( !ownerDrawn )
+    {
+        // ensure that controls state is consistent with internal state
+        DoSet3StateValue(m_state);
+    }
 }
 
 void wxCheckBox::OnMouseEnterOrLeave(wxMouseEvent& event)
@@ -451,7 +453,8 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
     // to it without breaking backwards compatibility
 
     // classic Win32 version -- this can be useful when we move this into
-#if 0
+    // wxRendererNative
+#if defined(__WXWINCE__) || !wxUSE_UXTHEME
     UINT state = DFCS_BUTTONCHECK;
     if ( !IsEnabled() )
         state |= DFCS_INACTIVE;