1. Transparency...
Hy,
Does somebody know how to make bitmaps transparent in win32 ?
In Dos it's easy, you only have to replace the
to_be_transparent_colors by the background color.
But in Win32, functions do not return the bitmap, but the handler.
I saw the Euphoria Windows Sprite Test by Greg Harris
and that's the kind of transparency I want.
But I want to use it with no pic_box,
but I want to use the whole window. (with window style WS_POPUPWINDOW)
And I use for loading the bitmap :
BMP=loadBitmapFromFile("BITMAP.BMP")
And for drawing it :
drawBitmap(Window,BMP,0,0)
PLEASE HELP!
Bye,
PQ
QC
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
2. Re: Transparency...
Hi Patrick,
-----Original Message-----
From: Patrick Quist <quistnet at HOTMAIL.COM>
To: EUPHORIA at LISTSERV.MUOHIO.EDU <EUPHORIA at LISTSERV.MUOHIO.EDU>
Date: Sunday, March 07, 1999 6:08 AM
Subject: Transparency...
>Does somebody know how to make bitmaps transparent in win32 ?
>In Dos it's easy, you only have to replace the
>to_be_transparent_colors by the background color.
>But in Win32, functions do not return the bitmap, but the handler.
Yeah... it not quite that easy is it
>I saw the Euphoria Windows Sprite Test by Greg Harris
>and that's the kind of transparency I want.
>But I want to use it with no pic_box,
You can use the whole window.. but you need to specify the hdc of the
Window.
>but I want to use the whole window. (with window style WS_POPUPWINDOW)
>And I use for loading the bitmap :
>BMP=loadBitmapFromFile("BITMAP.BMP")
>And for drawing it :
>drawBitmap(Window,BMP,0,0)
To achive transparency you can't do that.. There are 2 ways to do it other
than using direct-draw.
1. The method used in the sprite engine
2. Using CreateDib and StrectchDIBits..
Currently I am using CreateDib to load my bitmaps.. this is very similar to
read_bitmap in Euphoria except you have to set up the structures yourself
(which can be a pain).
CreateDib does have one nice effect.. you can peek and poke the bitmap data
so you can do stuff like virtual screens and pallette rotation.
Regards,
Greg Harris