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: Control Part during kEventControlClick




On Nov 30, 2004, at 11:43 AM, Darrin Cardani wrote:

The problem I'm running into is that when the user presses the mouse button while in the control, the event handler gets called with a kEventControlClick event, but it can't seem to get the proper control part to determine if it should increment or decrement the value. What it's doing is getting the mouse location parameter from the event, converting it to local coordinates, then calling TestControl () to find the part code. I've also tried FindControlUnderMouse (). Both of those always return 0 for the part code. So why can't I get the proper control part code in that situation? I'm setting the port to the control's owner before calling GlobalToLocal () on the mouse point I got from GetEventParameter (), so it should be the correct port and the correct coords. In fact, checking the coords returned from GlobalToLocal (), they are indeed inside the control's up or down arrow.

Is this a compositing or non-compositing window? That would affect the coordinate system that should be used (and the API).


-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: 
 >Control Part during kEventControlClick (From: Darrin Cardani <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.