Mailing Lists: Apple Mailing Lists

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

Compositing Windows, Edit field and Setting the Cursor



Hi All:

I had to change a window from a regular window to a compositing window in order to improve the quality of displayed images. The window 3 tabs and each tab has a few edit fields embedded in group box controls.

When the window was a non-compositing window, my code for changing the cursor from an arrow to an i-beam cursor worked. Now it's got problems as the "point in rect" check doesn't return noErr.

Here's my kWindowSetCursor code (error checking removed):

osErr = GetEventParameter(inEvent, kEventParamMouseLocation, typeHIPoint, NULL, sizeof(HIPoint), NULL, &hiMousePt);
osErr = GetEventParameter(inEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers);
osErr = GetEventParameter(inEvent, kEventParamDirectObject, typeControlRef, NULL, sizeof(ControlRef), NULL, &control);

osErr = HIViewGetFrame(control, &hiControlBounds);
if (CGRectContainsPoint(hiControlBounds, hiMousePt) == 1)
{
osReturnErr = noErr;
}

HIViewGetFrame returns an rectangle relative to the box that it's in, how do I get a rectangle relative to the window?

Any hints?

Thanks...


John
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.




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.