Hi!
I want to make a transparent window,to
put bitmap that seems flying on the screen
But The WS_EX_TRANSPARENT property with
CreateWindowEx doesn't work:
-Using WM_CREATE to create child static to draw my bitmap work doesn't work (in fact the bitmaps don't appear)

So i had to use WM_MOUSE to draw my bitmap
(i use a var to draw it Once)
But the problem is that when you go to another
window and then re-activate my application,the window isn't transparent at all and my bitmap
disappeared!!
I try WM_ACTIVATE,and WM_ACTIVATEAPP but.....no success

If someone could help me,or if someone know where
i can find source code of similar app to see how
i can do....
Thanks!
Farad77
Posted on 2002-01-13 15:12:37 by Farad77
iczelion has a tutorial on his site about layered windows. it wasnt written by him but still is a very good tutorial. this will get you on your way.

http://spiff.tripnet.se/~iczelion/files/laywin.zip
Posted on 2002-01-13 18:06:32 by smurf
-Using WM_CREATE to create child static to draw my bitmap work doesn't work (in fact the bitmaps don't appear)
Did you specify the SS_BITMAP style when you created the STATIC window? Or another option is to make it owner-drawn, and respond to the WM_DRAWITEM message to bitblt the bmp into it.
Posted on 2002-01-13 21:03:56 by sluggy
Farad77,

Is this any help to you?

transparent
Posted on 2002-01-14 05:12:31 by forge
Hi

As far as I know you have to draw the Bitmap by yourself when you choose the WS_EX_TRANSPARENT Style.
It only means that all other windows are drawn before your one has to be draw. And you have to draw the window by your own. Elsewhere the background is moving with your window.
Take a look at http://support.microsoft.com/default.aspx?scid=kb;EN-US;q92526 to see that Transparent windows aren't really supported.
If your are only wanne support Win 2k or greater then you cane use layered windows (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/layerwin.asp).

Wolf
Posted on 2002-01-14 06:53:47 by Wolf_HFS
I think you need to use Window Regions or something like that ;)

I attached a C source which shows how to make those regions and shows a bitmap whit transparent background.

Sami
Posted on 2002-01-14 13:04:12 by SamiP
Please warn when the executable shows this kind of things... some people are at office or at school when browsing this forum... :mad:
Thanks !

For those who are wondering what I'm talking about : the executable in the zip displays a... "n..ked woman". (hey all... don't rush on it ! :rolleyes: )
Posted on 2002-01-14 13:14:41 by JCP
Well, she have pants... only tits are shown ;)

Most of the time I'm in the office too when browsing this forum... but in Finland most of the offices have either a somekind play girl or play dude calendars on the walls. So I thought this wouldn't be too much sexy content for everybody.

BTW. The word Typy means in Finish a sexy girl
Posted on 2002-01-14 13:28:37 by SamiP
if you would like to make a bitmap "fly" over the desktop, why don't you paint it directly on the screen?

1)-save region where to paint it
2)draw it on there
-restore the region
-choose new position
-jmp 1)

2) could look like this:

invoke GetDesktopWindow
mov deskDC,eax
invoke Rectangle,deskDC,10,10,100,100


for example.......

hope that helps......

nop
Posted on 2002-01-14 14:32:58 by NOP-erator
Forge,your program is really what i want to do !!Do you have the asm source?
Or could you explain me the main Idea?

My computer is down :( ,but i'll try the WM_DRAWITEM (i already specify SS_BITMAP with the static) as soon as it'll work!

Thank you your precious answers
Posted on 2002-01-18 10:53:29 by Farad77
Farad77,

You should have email by now.
Posted on 2002-01-19 01:27:07 by forge
forge, may i see the source as well?
Posted on 2004-05-03 01:27:04 by coconut