+ wxMenu *menuOld = wxMenuBarBase::Replace(pos, menu, title);
+ if ( !menuOld )
+ return FALSE;
+ m_titles[pos] = title;
+// TODO:
+/*
+ if ( IsAttached() )
+ {
+ // can't use ModifyMenu() because it deletes the submenu it replaces
+ if ( !::RemoveMenu(GetHmenu(), (UINT)pos, MF_BYPOSITION) )
+ {
+ wxLogLastError("RemoveMenu");
+ }
+
+ if ( !::InsertMenu(GetHmenu(), (UINT)pos,
+ MF_BYPOSITION | MF_POPUP | MF_STRING,
+ (UINT)GetHmenuOf(menu), title) )
+ {
+ wxLogLastError("InsertMenu");
+ }
+
+#if wxUSE_ACCEL
+ if ( menuOld->HasAccels() || menu->HasAccels() )
+ {
+ // need to rebuild accell table
+ RebuildAccelTable();
+ }
+#endif // wxUSE_ACCEL
+
+ Refresh();
+ }
+*/
+ return menuOld;