creating Apple menu programmatically

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2004-04-21 16:16:34 +00:00
parent 2f8b21fc87
commit cda73c278d

View File

@ -507,6 +507,13 @@ void wxMenuBar::MacInstallMenuBar()
MenuBarHandle menubar = NewHandleClear( sizeof( MenuBarHeader ) ) ; MenuBarHandle menubar = NewHandleClear( sizeof( MenuBarHeader ) ) ;
::SetMenuBar( menubar ) ; ::SetMenuBar( menubar ) ;
DisposeMenuBar( 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 // clean-up the help menu before adding new items
MenuHandle mh = NULL ; MenuHandle mh = NULL ;