-/*
-#if !TARGET_CARBON
- long size = GetHandleSize( (Handle) menu ) ;
- const long headersize = 14 ;
- int oldlen = (**menu).menuData[0] + 1;
- int newlen = title[0] + 1 ;
-
- if ( oldlen < newlen )
- {
- // enlarge before adjusting
- SetHandleSize( (Handle) menu , size + (newlen - oldlen ) );
- }
-
- if ( oldlen != newlen )
- memmove( (char*) (**menu).menuData + newlen , (char*) (**menu).menuData + oldlen , size - headersize - oldlen ) ;
+ wxString str = wxStripMenuCodes( title ) ;
+ MenuRef menu ;
+#if TARGET_CARBON
+ CFStringRef cfs = wxMacCreateCFString( str ) ;
+ CreateNewMenu( id , 0 , &menu ) ;
+ SetMenuTitleWithCFString( menu , cfs ) ;
+ CFRelease( cfs ) ;
+#else
+ Str255 ptitle ;
+ wxMacStringToPascal( str , ptitle ) ;
+ menu = ::NewMenu( id , ptitle ) ;
+#endif
+ return menu ;
+}