]> git.saurik.com Git - wxWidgets.git/commitdiff
creating Apple menu programmatically
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 21 Apr 2004 16:16:34 +0000 (16:16 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 21 Apr 2004 16:16:34 +0000 (16:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/menu.cpp

index c99c5c89ff814972bdb01ef2c4597133ca1c8bd1..a98f3c3b87452bfefdf7ddcf77720c8c8bf5f101 100644 (file)
@@ -507,7 +507,14 @@ void wxMenuBar::MacInstallMenuBar()
     MenuBarHandle menubar = NewHandleClear( sizeof( MenuBarHeader ) ) ;
     ::SetMenuBar( menubar ) ;
     DisposeMenuBar( menubar ) ;
-        
+    MenuHandle appleMenu = NULL ;
+    char appleMenuTitle[3] = { 01 , kMenuAppleLogoFilledGlyph , 0 } ;
+
+    verify_noerr( CreateNewMenu( kwxMacAppleMenuId , 0 , &appleMenu ) ) ;
+    verify_noerr( SetMenuTitle( appleMenu , (ConstStr255Param) appleMenuTitle ) );
+    MacInsertMenuItem( appleMenu , "\pAbout..." , 0 ) ;
+    MacInsertMenu( appleMenu , 0 ) ;
+
     // clean-up the help menu before adding new items
     MenuHandle mh = NULL ;
     if ( UMAGetHelpMenu( &mh , &firstUserHelpMenuItem) == noErr )