]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/control.cpp
Don't complain under MicroWindows if a wxDC's HDC is NULL - it happens
[wxWidgets.git] / src / motif / control.cpp
index 4eb2e47f0a93be3476abfc5505d4237140d00847..c31dec797f2882be426cad8e3cfd2a38e39e2849 100644 (file)
@@ -43,7 +43,7 @@ wxControl::wxControl()
     m_inSetValue = FALSE;
 }
 
-wxControl::wxControl( wxWindow *parent,
+bool wxControl::Create( wxWindow *parent,
                       wxWindowID id,
                       const wxPoint &pos,
                       const wxSize &size,
@@ -51,11 +51,13 @@ wxControl::wxControl( wxWindow *parent,
                       const wxValidator& validator,
                       const wxString &name)
 {
-    (void)Create(parent, id, pos, size, style, name);
+    bool ret = wxWindow::Create(parent, id, pos, size, style, name);
 
 #if wxUSE_VALIDATORS
     SetValidator(validator);
 #endif
+
+    return ret;
 }
 
 wxControl::~wxControl()
@@ -65,7 +67,7 @@ wxControl::~wxControl()
     wxPanel *panel = wxDynamicCast(GetParent(), wxPanel);
     if (panel)
     {
-        if (panel->GetDefaultItem() == this)
+        if ( (wxControl *)panel->GetDefaultItem() == this)
             panel->SetDefaultItem((wxButton*) NULL);
     }
 }