PDA

View Full Version : Getting rid of thin window border in Carbon


RenHoek
2004.08.09, 05:56 AM
Hi Guys

I'm currently at my wits end with Carbon windows.
The program I work on has to have a nice splashscreen
come up on startup.
This splash screen is not a rectangular window, but is in
the shape of the company logo.

To cut a long story short, I currently take a screengrab of a centre
area on screen onto a bitmap, blit the logo onto this bitmap,
then pop a window that displays this new bitmap.
( so it appears the logo is simply 'hovering' in the middle
of the screen while the program loads in the background )

But the problem is the window has a very annoying
2-pixel border around it!! :(
I have looked through the window attributes and turned
off _everything_ I don't want (eg dropshadows) but there
is no option to turn this border off.


So does anyone know either of these questions...
1) How to turn the border off?
2) If we can't, is there some way to draw outside the
window boundary?
3) Are there better ways I can be doing this? (ie, display
a non-rectangular image on screen)


Thanks heaps for you help
Brian Sharpe.

Wired
2004.08.09, 07:01 AM
If you are using an HIView-based window, you can create an Overlay window. This is a fully transparent window, but the subviews will "float" and still display opaquely.

Or, you can use a window definition -- aka WDEF. While I don't think the resources work still, you can call ReshapeCustomWindow and you get a carbon event sent to you that is "kWindowMsgDraw". When you get this message, you use the QuickDraw routines to fill in a RgnHandle that represents what you want your window to look like. In my experience, overriding the default behavior for this message causes the border to disappear.

HTH