]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/control.cpp
Don't overwrite status message when restoring it if it changed.
[wxWidgets.git] / src / msw / control.cpp
index 745e9bd2a66cbd4aec8744dd4dfe17fd84690170..1fac8d1ed242f5741be14949701180df7f572b20 100644 (file)
@@ -59,15 +59,6 @@ IMPLEMENT_ABSTRACT_CLASS(wxControl, wxWindow)
 // wxControl implementation
 // ============================================================================
 
 // wxControl implementation
 // ============================================================================
 
-// ----------------------------------------------------------------------------
-// wxControl ctor/dtor
-// ----------------------------------------------------------------------------
-
-wxControl::~wxControl()
-{
-    m_isBeingDeleted = true;
-}
-
 // ----------------------------------------------------------------------------
 // control window creation
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // control window creation
 // ----------------------------------------------------------------------------
@@ -152,13 +143,11 @@ bool wxControl::MSWCreateControl(const wxChar *classname,
 
     if ( !m_hWnd )
     {
 
     if ( !m_hWnd )
     {
-#ifdef __WXDEBUG__
         wxLogLastError(wxString::Format
                        (
         wxLogLastError(wxString::Format
                        (
-                        _T("CreateWindowEx(\"%s\", flags=%08lx, ex=%08lx)"),
+                        wxT("CreateWindowEx(\"%s\", flags=%08lx, ex=%08lx)"),
                         classname, style, exstyle
                        ));
                         classname, style, exstyle
                        ));
-#endif // __WXDEBUG__
 
         return false;
     }
 
         return false;
     }
@@ -254,6 +243,9 @@ WXDWORD wxControl::MSWGetStyle(long style, WXDWORD *exstyle) const
 
 wxSize wxControl::DoGetBestSize() const
 {
 
 wxSize wxControl::DoGetBestSize() const
 {
+    if (m_windowSizer)
+       return wxControlBase::DoGetBestSize();
+       
     return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
 }
 
     return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
 }