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: Attributes from a kEventWindowBoundsChanging



On Thursday, May 15, 2003, at 9:01 AM, John Cebasek wrote:

'Morning all:

In my kEventWindowBoundsChanging handler for window resizing, I do the following:

GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(UInt32), NULL, &attributes);
if ((attributes & kEventWindowBoundsChanged) == kEventWindowBoundsChanged)
{
.
.
.
}

However, attributes is never kEventWindowBoundsChanged (which is 27), if I log the GetEventParameter, all I see is a 6 (which is deactivated?)

Why would I never get a bounds changed message in the windows changing handler if I'm resizing a window. Or better yet, what's a '6'? It shouldn't be deactivated, should it???

You're using the wrong constants to examine the attributes parameter. That parameter will contain a combination of the following constants:

enum {

/*
* The bounds is changing because the user is dragging the window
* around.
*/
kWindowBoundsChangeUserDrag = (1 << 0),

/*
* The bounds is changing because the user is resizing the window.
*/
kWindowBoundsChangeUserResize = (1 << 1),

/*
* The dimensions of the window (width and height) are changing.
*/
kWindowBoundsChangeSizeChanged = (1 << 2),

/*
* The top left corner (origin) is changing.
*/
kWindowBoundsChangeOriginChanged = (1 << 3),

/*
* The bounds is changing because ZoomWindow or ZoomWindowIdeal was
* called. Note that this flag does not imply any user interaction;
* if the application calls ZoomWindow itself without user request,
* this flag will still be set. Available in Mac OS X 10.2 and
* CarbonLib 1.6, and later.
*/
kWindowBoundsChangeZoom = (1 << 4)
};

-eric
_______________________________________________
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.

References: 
 >Attributes from a kEventWindowBoundsChanging (From: John Cebasek <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.