// macros
// ----------------------------------------------------------------------------
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox)
-#endif
// ============================================================================
// implementation
bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos,
const wxSize& size, long style,
+#if wxUSE_VALIDATORS
const wxValidator& validator,
+#endif
const wxString& name)
{
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;
// Subclass again for purposes of dialog editing mode
SubclassWin(m_hWnd);
+ LONG lColor = (LONG)m_backgroundColour.GetPixel();
+
+ ::WinSetPresParam( m_hWnd
+ ,PP_BACKGROUNDCOLOR
+ ,sizeof(LONG)
+ ,(PVOID)&lColor
+ );
+
SetFont(parent->GetFont());
SetSize(x, y, width, height);
// TODO
}
-wxSize wxCheckBox::DoGetBestSize()
+wxSize wxCheckBox::DoGetBestSize() const
{
int wCheckbox, hCheckbox;
bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *label,
const wxPoint& pos,
const wxSize& size, long style,
+#if wxUSE_VALIDATORS
const wxValidator& validator,
+#endif
const wxString& name)
{
SetName(name);
+#if wxUSE_VALIDATORS
SetValidator(validator);
+#endif
if (parent) parent->AddChild(this);
SetBackgroundColour(parent->GetBackgroundColour()) ;
checkWidth = -1 ;
checkHeight = -1 ;
- long msStyle = CHECK_FLAGS;
+// long msStyle = CHECK_FLAGS;
HWND wx_button = 0; // TODO: Create the bitmap checkbox