]> git.saurik.com Git - wxWidgets.git/commitdiff
native checkbox didn't have correct state after switching from owner drawn to normal...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 20 May 2005 12:34:47 +0000 (12:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 20 May 2005 12:34:47 +0000 (12:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/checkbox.cpp

index 1734a9b214b700100ea147354a0ebd4b0321f64a..da41a256e0d6be5dce0b0f5bc8fc2d3d80c17441 100644 (file)
@@ -374,6 +374,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)