wxStAppResource resload ;
- Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
- wxString message ;
- wxCHECK_RET( menubar != NULL, wxT("can't read MBAR resource") );
+ MenuBarHandle menubar = NewHandleClear( sizeof( MenuBarHeader ) ) ;
::SetMenuBar( menubar ) ;
-#if TARGET_API_MAC_CARBON
- ::DisposeMenuBar( menubar ) ;
-#else
- ::DisposeHandle( menubar ) ;
-#endif
-
-#if TARGET_API_MAC_OS8
- MenuHandle menu = ::GetMenuHandle( kwxMacAppleMenuId ) ;
- if ( CountMenuItems( menu ) == 2 )
- {
- ::AppendResMenu(menu, 'DRVR');
- }
-#endif
-
+ DisposeMenuBar( menubar ) ;
+
// clean-up the help menu before adding new items
MenuHandle mh = NULL ;
if ( UMAGetHelpMenu( &mh , &firstUserHelpMenuItem) == noErr )
bool wxMenuBar::Enable( bool enable)
{
- wxCHECK_RET( IsAttached(), wxT("doesn't work with unattached menubars") );
+ wxCHECK_MSG( IsAttached(), false, wxT("doesn't work with unattached menubars") );
size_t i;
for (i = 0; i < GetMenuCount(); i++)
{
for ( size_t i = 0; i < count; i++ )
{
wxString title = wxStripMenuCodes(m_titles[i]);
- if ( menuString == title )
+ if ( menuLabel == title )
return m_menus[i]->FindItem(itemString);
}