X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e453fe965695996f7796d22783fa2c77645e717d..5bf3b6fe48580853044132c381d3548535ca7ad1:/src/msw/control.cpp?ds=inline diff --git a/src/msw/control.cpp b/src/msw/control.cpp index e2e7a25e1c..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; } @@ -174,7 +163,7 @@ bool wxControl::MSWCreateControl(const wxChar *classname, // Notice that 0xffff is not a valid Unicode character so the problem // doesn't arise in Unicode build. if ( !label.empty() && label[0] == -1 ) - ::SetWindowText(GetHwnd(), label); + ::SetWindowText(GetHwnd(), label.wx_str()); #endif // !wxUSE_UNICODE // saving the label in m_labelOrig to return it verbatim @@ -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); }