// 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"
int wCheckbox, hCheckbox;
if ( !str.IsEmpty() )
{
- GetTextExtent(str, &wCheckbox, &hCheckbox);
+ GetTextExtent(wxStripMenuCodes(str), &wCheckbox, &hCheckbox);
wCheckbox += s_checkSize + GetCharWidth();
if ( hCheckbox < s_checkSize )
}
::SetWindowLong(GetHwnd(), GWL_STYLE, style);
+
+ if ( !ownerDrawn )
+ {
+ // ensure that controls state is consistent with internal state
+ DoSet3StateValue(m_state);
+ }
}
void wxCheckBox::OnMouseEnterOrLeave(wxMouseEvent& event)
// 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;