News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

problems for understand mask for Bitmap

Started by RHL, April 02, 2012, 04:32:09 AM

Previous topic - Next topic

RHL

Hello guys, well I'm try make a mask for a bitmap
but I not understand :(
I found these tutorials:

http://www.relisoft.com/win32/bitmap.html
http://www.winprog.org/tutorial/transparency.html

but none show me as do it step to step , someone know do or know a good tutorial? thanks MASM forum!

MichaelW

This is not exactly what you seem to be asking for, but there is an example here that uses MaskBlt and a mask that I created in Paint to make the corners of playing-card bitmaps transparent. It should be possible to automate the creation of the mask, but for the simple example it was easier to make one in Paint.

eschew obfuscation

zemtex

You can write your own routine to do it quite easily using dib sections. Is this what you mean?
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

RHL

Quote from: zemtex on April 02, 2012, 09:54:09 AM
You can write your own routine to do it quite easily using dib sections. Is this what you mean?

ur zip is detected as virus   :eek

dedndave

and no source code   :'(
although, it was pretty easy to disassemble

it passes by MBAM

RHL

MichaelW: thanks u, I will check




in general I want insert a bitmap for a button control but the bitmap has a white background color and I want delete it,

@dedndave:
:) ok ok sorry for my drama lol, what is yah? xd

dedndave


dedndave

as for the image...
there are many ways to do it
but i would make the image a transparency

i want to add a couple notes....

you can set the background color when you register a window class
for the 3 child windows (RHLWin), i used 0 for the hbrBackground member of the WNDCLASSEX structure
that means that no background is drawn
i did that because i knew i was going to fill the entire window with an image

also, when you use a bitmap in a static control, the static control sizes itself to the image
so, you only need worry about the x and y position - the size will take care of itself