Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InsertMenu Callbacks




On Aug 8, 2007, at 7:22 AM, Paul McEwan wrote:

I've successfully created some menus using InsertMenu in a Carbon app that
gets loaded as a plug-in, and attached an event handler using
InstallControlEventHandler with kEventClassControl and kEventControlClick


I receive the events when the menu items are clicked, but how do I figure
out which one is clicked?


Am I using the right event constants, kEventClassControl and
kEventControlClick for handling menu items or should I be using something
else?

You should probably use kEventCommandProcess. The HICommand parameter in the event has the MenuRef and MenuItemIndex.


-eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >InsertMenu Callbacks (From: "Paul McEwan" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.