]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
avoid leaking allocated tooltips
[wxWidgets.git] / src / msw / control.cpp
index 745e9bd2a66cbd4aec8744dd4dfe17fd84690170..06d75a9921d9c79b989ba197d1de87283c4ec012 100644 (file)
@@ -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);
 }