- m_frameMenuBar = NULL;
-
-#if wxUSE_TOOLBAR
- m_frameToolBar = NULL ;
-#endif
- m_frameStatusBar = NULL;
-
- SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
-
- if ( id > -1 )
- m_windowId = id;
- else
- m_windowId = (int)NewControlId();
-
- if (parent) parent->AddChild(this);
-
- if (!parent)
- wxTopLevelWindows.Append(this);
-
- MacCreateRealWindow( title, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
-
- m_macWindowData->m_macWindowBackgroundTheme = kThemeBrushDocumentWindowBackground ;
-
- wxModelessWindows.Append(this);
+
+ if ( !wxTopLevelWindow::Create(parent, id, title, pos, size, style, name) )
+ return FALSE;
+
+ SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE));