X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/619ddbbe360355c760feb140a65839aa28fc8b19..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/msw/control.cpp

diff --git a/src/msw/control.cpp b/src/msw/control.cpp
index 745e9bd2a6..06d75a9921 100644
--- a/src/msw/control.cpp
+++ b/src/msw/control.cpp
@@ -59,15 +59,6 @@ IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
 // wxControl implementation
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// wxControl ctor/dtor
-// ----------------------------------------------------------------------------
-
-wxControl::~wxControl()
-{
-    m_isBeingDeleted = true;
-}
-
 // ----------------------------------------------------------------------------
 // control window creation
 // ----------------------------------------------------------------------------
@@ -152,13 +143,11 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
 
     if ( !m_hWnd )
     {
-#ifdef __WXDEBUG__
         wxLogLastError(wxString::Format
                        (
                         _T("CreateWindowEx(\"%s\", flags=%08lx, ex=%08lx)"),
                         classname, style, exstyle
                        ));
-#endif // __WXDEBUG__
 
         return false;
     }
@@ -254,6 +243,9 @@ WXDWORD wxControl::MSWGetStyle(long style, WXDWORD *exstyle) const
 
 wxSize wxControl::DoGetBestSize() const
 {
+    if (m_windowSizer)
+       return wxControlBase::DoGetBestSize();
+       
     return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
 }