moved assert for parent window not being a static box to common code where it should catch more cases

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-10 17:19:57 +00:00
parent b8afeb4321
commit 106844da7d
2 changed files with 12 additions and 11 deletions

View File

@@ -394,17 +394,6 @@ bool wxWindowMSW::Create(wxWindow *parent,
{
wxCHECK_MSG( parent, FALSE, wxT("can't create wxWindow without parent") );
#if wxUSE_STATBOX
// wxGTK doesn't allow to create controls with static box as the parent so
// this will result in a crash when the program is ported to wxGTK - warn
// about it
//
// the correct solution is to create the controls as siblings of the
// static box
wxASSERT_MSG( !wxDynamicCast(parent, wxStaticBox),
_T("wxStaticBox can't be used as a window parent!") );
#endif // wxUSE_STATBOX
if ( !CreateBase(parent, id, pos, size, style, wxDefaultValidator, name) )
return FALSE;