me again ^_^' I need some help.
this time I'm having troubles making a region of a child window transparent, I dont know if it doesnt work becuse is a button or a child window, but when I change the handle from the childwindow to the parent window, it works, dunno whats the problem.

here is the code:

invoke LoadBitmap,hInstance,1001
mov hBmp1, eax
invoke SetBmpColor,hBmp1
mov hBmp1,eax

invoke CreateWindowEx,NULL,

mov hwndPlay,eax

invoke SendMessage,hwndPlay,BM_SETIMAGE,0,hBmp1

push 19h
push 54h
push 1h
push 1h
call CreateRectRgn

mov temp,eax
push 1h
push temp
push hwndPlay
call SetWindowRgn

I got this code from testp department tutorials (number 30)
I dont know what I'm doing wrong.

thx in advance

Posted on 2001-10-10 04:09:44 by Vital Zero
All I know is that you can use
API 'SetWindowRgn only with the Main Window.
So, for example, if your Bitmap is a circle
create a rounded region for that.
Create another region for the second bitmap
and so on ...
Combine all created regions (API 'CombineRgn')
and at last set the combined region to your
Main Window Region (API 'SetWindowRgn').

Let me say that you must use the handle of the
main window on API 'SetWindowRgn'.

mov temp,eax
push 1h
push temp
push hwndPlay;----->use the main window handle !
call SetWindowRgn

Posted on 2001-10-10 07:50:47 by Test Department
yeah, I noticed that, but the problem is, that i want to set the transparency in a child window (button) because I have a bitmap for it, but I can see the border and shadows of the button, and even if i resize the button to the same size as the bitmap, it still shows the border.

Is there a way to do this with child windows? because I have seen proggies with bitmap buttons without that border and shadows.

see attached pic

Posted on 2001-10-10 15:06:39 by Vital Zero
Shame, shame
I' m full wrong in my last post.
I'm very sorry.

Of course we can use API 'SetWindowRgn' with child windows !

The button problem is well known.
The solution for me was to create a region that is a little bit
smaller than the buttons, or on the other way we can set
the buttons width and height a little bit greater than the
bitmap size.

An example are the cdplayer buttons in my skinner example.

I f you don't need the 'push' effect you can use STATIC windows.
No border problems with the STATIC style.

But on the other hand it looks also good if you display the whole
An example for that are the buttons in my memory example.

I hope I understand what you are asking for.

The skinner and memory example's are avaible at:

Posted on 2001-10-11 01:22:46 by Test Department
ok, im going there.
btw, just in case you are wondering
here is how i want it to look
Posted on 2001-10-12 01:37:16 by Vital Zero