}
bool wxMDIParentFrame::Create(wxWindow *parent,
- wxWindowID id,
+ wxWindowID winid,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
m_windowMenu->Append(IDM_WINDOWNEXT, wxT("&Next"));
}
- if ( !wxFrame::Create( parent , id , title , pos , size , style , name ) )
+ if ( !wxFrame::Create( parent , winid , title , pos , size , style , name ) )
return false;
m_parentFrameActive = true;
}
bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
- wxWindowID id,
+ wxWindowID winid,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
SetName(name);
- if ( id == wxID_ANY )
- id = (int)NewControlId();
+ if ( winid == wxID_ANY )
+ winid = (int)NewControlId();
- wxNonOwnedWindow::Create( parent, id, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
+ wxNonOwnedWindow::Create( parent, winid, pos , size , MacRemoveBordersFromStyle(style) , name ) ;
SetTitle( title );
{
wxLogTrace(TRACE_MDI, wxT("MDI child=%p MacActivate(0x%08lx,%s)"),this, timestamp, activating ? wxT("ACTIV") : wxT("deact"));
- wxMDIParentFrame *mdiparent = wxDynamicCast(m_parent, wxMDIParentFrame);
+ wxMDIParentFrame *mdiparent = m_mdiParent;
wxASSERT(mdiparent);
if (activating)
// MDI operations
void wxMDIChildFrame::Activate()
{
- Raise ();
+ // The base class method calls Activate() so skip it to avoid infinite
+ // recursion and go directly to the real Raise() implementation.
+ wxFrame::Raise();
}
//-----------------------------------------------------------------------------