Hi,
T
here was a tutorial on Iczelions site a good while ago which demonstarted loading a bitmap and interepting a single colour as transparent.

It would then create a region based on the image and you'd have cool looking windows.

Does anyone know where I can get this? I've since lost it.

Thanks
Posted on 2001-08-27 07:13:20 by Eóin
Hi Zadkiel,

Have a look this:

Transparency

If it is what you want then I could help you.
Posted on 2001-08-27 07:44:43 by forge
Zadkiel

Would that be Hiroshimator's "Skin a Window" example?
Posted on 2001-08-27 09:24:13 by bcraven
Yep that was it, thanks.
Posted on 2001-08-27 11:06:30 by Eóin
i need to reread it
Posted on 2001-09-29 03:19:29 by baumann
Its on Iczelions site. Here's the exact address

P.S. If your intrested, heres my version of the code. Though I'd say its slower since it calls APIs inside the main loop it may be of intrest

w & h should contain the width and height of bmp, esi points to start of 32bit bmp oizel info and tcoll is the transparent colour.

LOCAL x,w,h,pR,sR,Rgn,tRg
LOCAL trect:RECT

invoke CreateRectRgn,0,0,0,0
mov Rgn,eax
xor ecx,ecx

yl:
mov eax,h
mov trect.bottom,eax
dec eax
mov trect.top,eax
xor ebx,ebx
xl:
mov eax,
cmp eax,tcol
jne l1
;--------------------------------------------------------------
cmp ecx,1
jne l4
;--------------------------------------------------------------
invoke CreateRectRgn,trect.left,trect.top,\
trect.right,trect.bottom
mov tRg,eax
invoke CombineRgn,Rgn,Rgn,eax,RGN_OR
invoke DeleteObject,tRg
;--------------------------------------------------------------
l4: xor ecx,ecx
jmp l2
;--------------------------------------------------------------
l1: cmp ecx,1
jne l3
inc trect.right
jmp l2
;--------------------------------------------------------------
l3: mov eax,ebx
mov trect.left,ebx
inc eax
mov trect.right,eax
mov ecx,1
;--------------------------------------------------------------
l2: inc ebx
cmp ebx,w
jne xl
mov eax,w
shl eax,2
add esi,eax
dec h
jnz yl
mov eax,Rgn
Posted on 2001-09-29 07:38:16 by Eóin
???
Posted on 2001-09-29 07:44:46 by baumann
Here is my unfinished tutorial about irregular window shapes:

http://comrade.win32asm.com/download/tutorial/shapewnd.zip
http://comrade.ownz.com/download/tutorial/shapewnd.zip

I have also attached it to this post if you have trouble accessing the links.
Posted on 2001-09-29 12:06:38 by comrade