// the children
// ===========================================================================
+void wxMDIParentFrame::Init()
+{
+#if wxUSE_MENUS && wxUSE_ACCEL
+ // the default menu doesn't have any accelerators (even if we have it)
+ m_accelWindowMenu = NULL;
+#endif // wxUSE_MENUS && wxUSE_ACCEL
+}
+
bool wxMDIParentFrame::Create(wxWindow *parent,
wxWindowID id,
const wxString& title,
m_windowMenu->Append(wxID_MDI_WINDOW_PREV, _("&Previous"));
}
-#if wxUSE_MENUS && wxUSE_ACCEL
- // the default menu doesn't have any accelerators (even if we have it)
- m_accelWindowMenu = NULL;
-#endif // wxUSE_MENUS && wxUSE_ACCEL
-
if (!parent)
wxTopLevelWindows.Append(this);
}
#if wxUSE_ACCEL
- delete m_accelWindowMenu;
- m_accelWindowMenu = NULL;
+ wxDELETE(m_accelWindowMenu);
if ( menu && menu->HasAccels() )
m_accelWindowMenu = menu->CreateAccelTable();
processed = true;
break;
-
- case WM_ERASEBKGND:
- processed = true;
-
- // we erase background ourselves
- rc = true;
- break;
-
- case WM_SIZE:
- // though we don't (usually) resize the MDI client to exactly fit
- // the client area we need to pass this one to DefFrameProc to
- // allow the children to show
- break;
}
if ( !processed )
if ( event.GetEventType() == wxEVT_COMMAND_MENU_SELECTED )
{
wxMDIChildFrame * const child = GetActiveChild();
- if ( child && child->ProcessEventHere(event) )
+ if ( child && child->ProcessWindowEventLocally(event) )
return true;
}
inserted = true;
::InsertMenu(hmenu, i, MF_BYPOSITION | MF_POPUP | MF_STRING,
(UINT_PTR)menuWin,
- wxGetTranslation(WINDOW_MENU_LABEL).wx_str());
+ wxString(wxGetTranslation(WINDOW_MENU_LABEL)).wx_str());
break;
}
}
{
::AppendMenu(hmenu, MF_POPUP,
(UINT_PTR)menuWin,
- wxGetTranslation(WINDOW_MENU_LABEL).wx_str());
+ wxString(wxGetTranslation(WINDOW_MENU_LABEL)).wx_str());
}
}