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: kEventWindowGetRegion - only with HIView?



Did you try setting the window's clip region to the same region you returned to kEventWindowGetRegion?
Or passing this region to CopyBits as the maskRgn parameter?
I've never attempted either of these, just curious.


On Oct 27, 2007, at 4:35 AM, Andreas Falkenhahn wrote:


Hi,

I want my window to appear partially transparent. So I thought I could
simply listen to kEventWindowGetRegion and return a custom region
when kEventParamWindowRegionCode is kWindowOpaqueRgn. This
approach is presented here:
http://developer.apple.com/samplecode/CarbonTransparentWindow/ index.html


However, the region I set during kEventWindowGetRegion is not respected
by CopyBits(). I'm doing all my drawing using CopyBits() and it is not
done inside a HIView. I.e. my drawing is not restricted to the scope of
the kEventControlDraw event. The window is non-composited.


So my question would be: If I want the window to have transparent parts,
do I have to use a HIView control and then restrict all drawing operations
(i.e. in my case all calls to CopyBits()) to the scope of kEventControlDraw
of that HIView?


I would really like to avoid this because it would involve major changes
in my program structure. I would really like to be able to draw whenever
I want but CopyBits() should not draw over the transparent areas in my
window. Is this possible somehow? Maybe with CreateCustomWindow()?


Tks

Andreas

_______________________________________________
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/jstiles% 40blizzard.com


This email sent to email@hidden

_______________________________________________ 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: 
 >kEventWindowGetRegion - only with HIView? (From: "Andreas Falkenhahn" <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.