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: Overlay Window on top of Utility Window




On May 29, 2006, at 3:28 AM, Mark Gilbert wrote:

Folks.

I wonder if anyone knows how I should go about attaching an overlay window to the top of a utility window.

I have got everything working, but a side effect of creating a new window group to connect the windows is that the Utility window ceases to 'float' on top of all other application windows.

- Is it possible to have this situation - where a utility window is in a windowgroup with an overlay and still stays in front (just with the overlay on top)

Yes, it should be possible. I'd suggest code something like this:

// create your group
WindowGroupRef group;
CreateWindowGroup( kWindowGroupAttrMoveTogether | kWindowGroupAttrSharedActivation | kWindowGroupAttrHideOnCollapse, &group );


// make the group be a subgroup of the utility window group
SetWindowGroupParent( group, GetWindowGroup( utilityWindow ) );

// put the utility window and the overlay window into the group
SetWindowGroup( utilityWindow, group );
SetWindowGroup( overlayWindow, group );

// make sure the overlay window is in front of the group
BringToFront( overlayWindow );

// make the overlay and utility windows always z-order together
ChangeWindowGroupAttributes( group, kWindowGroupAttrLayerTogether, 0 );

-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: 
 >Overlay Window on top of Utility Window (From: Mark Gilbert <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.