// wxControl implementation
// ============================================================================
-// ----------------------------------------------------------------------------
-// wxControl ctor/dtor
-// ----------------------------------------------------------------------------
-
-wxControl::~wxControl()
-{
- m_isBeingDeleted = true;
-}
-
// ----------------------------------------------------------------------------
// control window creation
// ----------------------------------------------------------------------------
if ( !m_hWnd )
{
-#ifdef __WXDEBUG__
wxLogLastError(wxString::Format
(
_T("CreateWindowEx(\"%s\", flags=%08lx, ex=%08lx)"),
classname, style, exstyle
));
-#endif // __WXDEBUG__
return false;
}
// 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
wxSize wxControl::DoGetBestSize() const
{
+ if (m_windowSizer)
+ return wxControlBase::DoGetBestSize();
+
return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT);
}