Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Adding items in a popup menu (Carbon)

Adding items in a popup menu (Carbon)
Thread Tools
iJed
Dedicated MacNNer
Join Date: May 2001
Location: Edinburgh, UK
Status: Offline
Reply With Quote
Sep 19, 2001, 04:10 PM
 
How do you add items to a popup menu in a dialog box? I just can't seem to find the correct API call to do this and none of the menu manager calls appear to be any use unless the menu is also part of the menu bar. This should be a really trivial task, so I bet that I have overlooked something extremely obvious!
     
aleph_null
Dedicated MacNNer
Join Date: Jan 2001
Location: Boulder, CO, USA
Status: Offline
Reply With Quote
Sep 20, 2001, 04:17 PM
 
If you can get a MenuRef for the menu, adding items should just be a matter of calling AppendMenuItemText or its variants. How you get the MenuRef is determined by how you're creating and/or using the menu, of course.

By the way, you can add menus to the menu list (and not have them appear in the menu bar) by calling InsertMenu with kInsertHierarchicalMenu as the position argument.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:02 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,