Contribute  :  Calendar  :  Advanced Search  :  Site Statistics  :  Directory  :  Files to download  :  Links for developers  :  Privacy policy  :  Web Resources  :  Polls  
    MacOSX Guru Site Information, tips and tricks, FAQ for Mac OS X developers    
 Welcome to MacOSX Guru Site
 Wednesday, July 18 2018 @ 11:05 PM BST

How do I use the 'Preferences' menu item ?

   
Carbon Development FAQMacOS X automatically adds a "Preferences" menu item, but it's always disabled, and EnableItem() seems to think the item doesn't exist in my menu???

To enable the "Preferences" menu item, use "EnableMenuCommand( NULL, kHICommandPreferences );" to enable it. EnableMenuCommand() can search your entire menu bar, even those parts of the application menu that wasn't created by you (which is actually a separate menu that's simply been inserted into your application menu). You also need to register a kEventProcessCommand Carbon Event Handler on your application's or window's event target from which you can handle menu selections.
 

What's Related

Story Options

How do I use the 'Preferences' menu item ? | 0 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
 Copyright © 2018 MacOSX Guru Site
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.06 seconds